Rails: could not find rake-10.1.1 in any of the sources

I got an error while running the Rake command. When I try to Rake in my Rails project, I get an error Could not find rake-10.1.1 in any of the sources.

I put Rake 10.1.1 into my Gemfile, but it doesn't seem to do anything when I install install.

I tried uninstalling and then installing Rake Gem on my Ruby computer, RVM Ruby-2.1.0, RVM Ruby-2.1.0@global and Gemset RVM, which I created for a specific project. I also tried uninstalling Gemfile.lock and then installing the package.

I tried to manually run rake from the terminal in several different Ruby / gems files, including RVM. He gives this error:

/Users/me/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/bin/rake ; exit; ~ me$ /Users/me/.rvm/gems/ruby-2.1.0/gems/rake-10.1.1/bin/rake ; exit; rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb)

I have a Rakefile in my project and tried to rename it (Rakefile.rb, rakefile).

When I run Rake commands, such as rake db:migrate, I get this error:

rake is interrupted! undefined local variable or method config' for main:Object /Users/me/RailsProject/config/environment.rb:4:in'/Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in require' /Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:inblock in require' / Users / me / .rvm / gems / ruby-2.1.0 / gems / activesupport-4.0.2 / lib / active_support / dependencies.rb: 214: in load_dependency' /Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:inrequire '/Users/me/.rvm/gems/ruby-2.1.0/gems/ railties-4.0.2 / lib / rails / application.rb: 189: in require_environment!' /Users/me/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:250:inblock in run_tasks_blocks '/Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in eval' /Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in' Tasks: TOP => db: migrate => environment (See Complete Trace by completing the task with --trace)

, , . , - . .

+4
2

, , , gemset, Rake . Rubyine Sublime. , . IDE.

0

, . gem install rake? , bundle exec rake.

0

Source: https://habr.com/ru/post/1525530/


All Articles