I’m sure this is a really easy question to answer but it’s confounding
me.
Running on Windows, in my Gemfile I have
gem ‘rails’, ‘3.0.3’
So when I sync my source out to my production environment, I’d expect
to be able to run a ‘bundle install’ and all the appropriate gems
would get installed, including the rails gem, but this isn’t the case.
All the other supporting gems are installed except the rails gem. I
actually have to seperately run ‘gem install rails’ to get it.
I’m sure I’m doing/missing something really silly, so please enlighten
me. Many thanks.
bundle show rails
C:/system/Ruby/lib/ruby/gems/1.9.1/gems/rails-3.0.3
which is what I’d expect because its what I have specifically
installed, however. When I just ran bundle install, if I’d run this
command I wouldn’t have expected to see similar output as the gem
wasn’t there at all.
Bundler does install the rails gem, however. What bundler doesn’t do
is setup the Windows shortcuts in the ruby\bin directory to allow the
rails command to work. If you ‘gem install rails’, those shortcuts are
setup and then you can run the rails command.
Bundler does install the rails gem, however. What bundler doesn’t do
is setup the Windows shortcuts in the ruby\bin directory to allow the
rails command to work. If you ‘gem install rails’, those shortcuts are
setup and then you can run the rails command.
if rails is in your bundle then
bundle exec rails
should run it for you even if there is no shortcut in place
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.