Sinatra + Bundler?

Inside your Sinatra app, you just have to require the bundler setup: require “bundler/setup” require “sinatra” get “https://stackoverflow.com/” do “Hello world!” end Alternatively, if you don’t want to add the additional require “bundler/setup” at the top of your app, you can instead invoke sinatra via bundle exec (e.g. bundle exec ruby myapp.rb) This assumes that … Read more

Error installing Nokogiri 1.5.0 with rails 3.1.0 and ubuntu

You need to have all the necessary libraries installed on your machine. When you installed RVM , it should have listed this for you. On the current version of rvm, you can run rvm requirements to see the exact list. Right now, that list is: sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g … Read more

What is the difference between “rails s” and “bundle exec rails s”?

Sometimes when you install a gem it comes with an executable/binary as well. Examples of these include: rails, rake, rspec, pry, etc. However, when you have multiple versions of a gem installed you then will have multiple versions of these executables sitting around. So if you want to execute one of these binaries for a … Read more

Can bundler show me which gems in Gemfile have newer versions (eg. dry-run of bundle update)

Bundler 1.1 introduced a new ‘outdated’ feature, which is exactly what I was looking for. Pat Shaughnessy has a great write-up on the new features. In his words, bundle outdated: displays the gems it would download and install, but without actually doing it. This gives me the freedom to inspect the list and update just … Read more

Rails: How can I remove default version of bundler?

For those who use rbenv, let say by accidentally you have two default versions $ gem list | grep bundler bundler (default: 2.1.4, default: 1.17.2) Check your gem installation path $ gem environment RubyGems Environment: . . – INSTALLATION DIRECTORY: /home/yohanes/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0 . Go to the specifications/default directory and look for bundlers gemspec $ cd /home/yohanes/.rbenv/versions/2.6.5/lib/ruby/gems/2.6.0/specifications/default … Read more

How to prevent bundler from generating binstubs?

Bundler generates binstubs on a per-application basis. If you ran bundle install –binstubs at some point in the past, Bundler will remember that and generate binstubs anytime you run install again. To disable them, you can either run bundle install –no-binstubs, or run rm -rf .bundle/config. Either way, that will disable binstub generation.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)