2

I am guessing that this answer has been already answered somewhere but I was not able to find it. I am having troubles with installing Rails 4. I have put in the Gemfile:

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.1'

And I have run bundle install --path vendor/bundle and all the gems are installed, but when I run bundle exec rails s then I receive an error:

bundler: command not found: rails
Install missing gem executables with `bundle install`

which rails doesn't returning anything. I am using ruby 2.0.0 and rvm and it seems everything has been set up.

What am I missing and how to set-up Rails 4?

Aleks
  • 4,866
  • 3
  • 38
  • 69
  • can you execute **gem install rails** directly in the console? Here is a link with the answer [link](http://stackoverflow.com/questions/15231798/installing-rails-4-0) – robzdc Apr 22 '14 at 21:56
  • yes I can. As a matter of a fact, I was able to use Rails 4 when I create a new gemset for rvm and install manually gem like that, but in that case I would need to switch gemset everytime I change project, which in a way I want to avoid – Aleks Apr 22 '14 at 22:06

2 Answers2

1

What solved my problem for Rails 4, in this case, was running a command in the root directory of the application:

bundle exec rake rails:update:bin

After that , running a bundle exec rails s reported no errors and was working as expected.

Aleks
  • 4,866
  • 3
  • 38
  • 69
0

In Gemfile please add

ruby 2.0.0

or

Try to use .ruby-version and .ruby-gemset.

Please read this

Community
  • 1
  • 1
Jenorish
  • 1,694
  • 14
  • 19