New Rails Project: 'Bundle Install' Can't Install Rails in Gemfile

Rails command not available after installing with gemfile

So, I was running rbenv rehash and setting the environment variable. However, the new env variables were not available until after a restart. Using the full path to /.rbenv/shims/rake solved the problem.

Rails: I installed Ruby, now bundle install doesn't work


Bundle with Ruby 2.1.6

You just need to install bundler :

rvm use ruby-2.1.6
gem install bundler

This will be installed in a gemset specific to ruby-2.1.6, so it won't interfere with anything you installed with ruby-2.3.0. You can use

bundle install

to install the required gems.

Trying with Ruby 2.3.0

Alternatively, you could just try the example you downloaded with ruby-2.3.0 by either changing the

ruby '2.1.6'

line or deleting it from the Gemfile.

Rails won't install

Please edit the file in your ruby rails project named Gemfile and change following

gem  'sqlite3'

to

gem 'sqlite3', '~> 1.3.11'

Now run following command to install Gem

bundle install

now run your rails project

rails s

Bundle install doesnt install gem in Gemfile

Through some detective work I found out the following factors contributed to my problem:

1) I was developing on a Windows machine that installed the windows-specific version of the gem pg: (0.14.0-x86-mingw32).

2) This was then added to my Gemfile.lock and consequently my repo that capistrano then used to install my app on a Debian box with; pg was listed as a dependency, only.

3) capistrano was running bundler with the "--deployment" flag, which requires your Gemfile.lock to be up-to-date and accurate.

How I resolved the problem was removed the "--deployment" flag from capistrano with the following variable definition in deploy.rb:

set :bundle_flags, "--quiet"

require 'bundler/capistrano'

And ran the cap deploy:update again.

Still working on a way to have the Gemfile.lock reflect that pg should be installed on the production environment, while pg should be installed on the development machine so I can include the --deployment option back into the deployment task.



Related Topics



Leave a reply



Submit