Please write your question in detail here.
rails server cannot start
[vagrant @ localhost sample_app] $rails server -b 0.0.0.0
rbenv: rails: command not found
The `rails' command exists in these Ruby versions: 2.5.7
[vagrant @ localhost sample_app] $Corresponding source code
What I tried
Please describe here what you have tried for the problem.
I tried to install the version 2.5.7 in the message
Is it because the version of ruby is old?
Please provide more detailed information here.
Answer # 1
It means that rails is installed in ruby 2.5.7 which is versioned by rbenv.
It seems that the version of ruby currently running is different.
As a temporary solution
bundle exec rails sCall rails described in Gemfile as
./bin/rails sThere seems to be a way to call rails installed under ./bin.
rbenv local 2.5.7There seems to be a way to change it to use ruby 2.5.7. (If you don't want sample_app to be used in a particular version)
- ruby on rails - how to transition from the top page
- ruby on rails - how to set the path to move from the top page to the new registration page
- ruby - [rails] i can't start unicorn
- ruby - rails s fails to start the server with a usage: rails new app_path [options] error
- ruby on rails - unable to start server in aws production environment
- ruby on rails - how to use requestreferer
- ruby on rails - cannot start unicorn cannot load `railsconfigactive_storageservice`
- ruby on rails - how to write a form object
- ruby on rails - how to translate view in rails
- how to embed code in ruby on rails
- ruby on rails - i want to start the puma server and deploy the rails app
- ruby on rails - even though i can log in with rails, the current_user specified in the user details view becomes nil and an erro
- ruby on rails - phenomenon that the test that should be an "rspec" error passes
- ruby on rails - no route matches , missing required keys: [: id] cannot be resolved
- ruby on rails - eliminate duplication of a particular column in your rails model and calculate each sum of different columns
- ruby - i can't install ffi with everyday rails setup
- ruby on rails - after updating to rails6
- ruby on rails 6 - i want to change the display of the product detail page according to the user's conditions
- ruby on rails - rails tutorial chapter 13 cooperation between heroku and aws s3 region
- ruby - passing variables using render partial
- ruby - deployment error on heroku
- ruby - output the total integer value held by each user
- ruby - i want to use the search method for active hash data
- ruby - destroy action does not respond
- ruby - how do you see the rails controller relative path? (carrierwave directory deleted)
- ruby - when deploying on capistrano, i get the error "access denied for user'ec2-user' @'localhost' (using password: no)&qu
- how to reflect the layout downloaded from the external site in ruby on rails?
- ruby - how nice! function routes do not pass well (relation) [rails]