1

Somehow the bundle shows the gem, but the rails server command is not available. Running bundle exec rails s is the only way to get rails to start. This is weird, since I'm working on the right gemset and have installed the rails gem to that gemset.

➜  myproject git:(staging) ✗ bundle show rails
/Users/me/.rvm/gems/ruby-2.4.4@myproject24/bundler/gems/rails-3804d017333d

➜  myproject git:(staging) ✗ rails s
Rails is not currently installed on this system. To get the latest version, simply type:

    $ sudo gem install rails

You can then rerun your "rails" command.

➜  myproject git:(staging) ✗ bundle exec rails s
=> Booting Thin
Abram
  • 39,950
  • 26
  • 134
  • 184
  • You will get more information from this question - https://stackoverflow.com/questions/23846493/what-is-the-difference-between-rails-s-and-bundle-exec-rails-s – Sahidur Rahman Suman Oct 02 '18 at 08:13
  • bundle exec rails makes sure the rails version bundled in your Gemfile.lock is used. Only using rails might not use that version but a different version installed in your gems directory – Sahidur Rahman Suman Oct 02 '18 at 08:15

0 Answers0