Rake routes are no longer available

Asked 1 years ago, Updated 1 years ago, 94 views

I'm a beginner at ruby.Rails development no longer works rake routes.
I don't understand even if I google it, so let me ask you a question.

>Macbook:PetsHuggy UserName$rake routes
rake aborted!
cannot load such file --bundler/setup
/Users/UserName/study/PetsHuggy/config/boot.rb:3:in`<top(required)>'
/Users/UserName/study/PetsHuggy/config/application.rb:1:in`require_relative'
/Users/UserName/study/PetsHuggy/config/application.rb:1:in`<top(required)>'
/Users/UserName/study/PetsHuggy/Rakefile:4:in `require_relative'
/Users/UserName/study/PetsHuggy/Rakefile:4:in`<top(required)>'
(See full trace by running task with --trace)

"PetsHuggy" is the name of the app I am currently creating, and I am creating it in the study file.
Other applications you are creating have similarly lost track routes.

I updated Rails from 5.0.1 to 5.0.2 the other day, so I think it was an error due to the poor way of doing so.
I tried to reinstall the bundle, but it didn't work.

I wondered if there was a problem with bundleer/setup, but

>/usr/local/lib/ruby/gems/2.4.0/gems/bundler-1.14.6/lib

It was present in .

By the way (I don't know if there's a way to do it) It says to try --trace, so the results of trying rake routes --trace are as follows:

>rake aborted!
cannot load such file --bundler/setup
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/Users/UserName/study/PetsHuggy/config/boot.rb:3:in`<top(required)>'
/Users/UserName/study/PetsHuggy/config/application.rb:1:in`require_relative'
/Users/UserName/study/PetsHuggy/config/application.rb:1:in`<top(required)>'
/Users/UserName/study/PetsHuggy/Rakefile:4:in `require_relative'
/Users/UserName/study/PetsHuggy/Rakefile:4:in`<top(required)>'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/rake_module.rb:25:in `load'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/rake_module.rb:25:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/application.rb:604:in `raw_load_rakefile'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/application.rb:89:in `block in load_rakefile'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/application.rb: 160: in `standard_exception_handling'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/application.rb:88:in `load_rakefile'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/application.rb:72:in `block in run'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/application.rb: 160: in `standard_exception_handling'
/System/Library/Frameworks/Ruby.framework/Version/2.0/usr/lib/ruby/2.0.0/rake/application.rb:70:in `run'
/usr/bin/rake:37:in`<main>'

Please tell me the cause and solution.
If it seems difficult to fix (preferably by not installing cleanly), please tell me how to reset the environment and rebuild the development environment.
Thank you.

ruby-on-rails ruby rake

2022-09-30 14:37

1 Answers

(From comments)

The reason was that it was running using ruby that came with the Mac, not rbenv.

After reviewing the rbenv configuration, such as bundle installation, the problem was resolved.


2022-09-30 14:37

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.