run the command bundle install in your shell, once you have your Gemfile created. This command will look your Gemfile and install the relevant Gems on the indicated versions. The Gemfiles are installed because in your Gemfile you are pointing out the source where the gems can be downloaded from.
The Gemfile. lock allows you to specify the versions of the dependencies that your application needs in the Gemfile , while remembering all of the exact versions of third-party code that your application used when it last worked correctly. By specifying looser dependencies in your Gemfile (such as nokogiri ~> 1.4.
A Gemfile describes the gem dependencies required to execute associated Ruby code. Place the Gemfile in the root of the directory containing the associated code. For instance, in a Rails application, place the Gemfile in the same directory as the Rakefile .
Make sure you're entering "bundle" update, if you have the bundler gem installed.
bundle update
If you don't have bundler installed, do gem install bundler
.
I had this problem, then I did:
gem install bundle
notice "bundle" not "bundler" solved my problem.
then in your project folder do:
bundle install
and then you can run your project using:
script/rails server
I had the same problem. This worked for me:
run rvm/script/rvm and also add it to your .profile or .bash_profile as shown in https://rvm.io/rvm/install/
use bundle without sudo
If You are using rvm, then try the following command:
rvmsudo gem install bundler
According to another question: Could not find rails (>= 0) amongst [] (Gem::LoadError)
Hope it helped, Cheers
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With