I am experiencing an error with running the Rake command. When I try to Rake in my Rails project, I get an error that says Could not find rake-10.1.1 in any of the sources
.
I put Rake 10.1.1 in my Gemfile, but it appears to do nothing when I bundle install.
I've tried uninstalling then installing the Rake gem in my computer's Ruby, RVM Ruby-2.1.0, the RVM Ruby-2.1.0@global, and the RVM gemset that I created for the specific project. I've also tried removing the Gemfile.lock and then bundle installing.
I've tried to manually run rake out of the terminal in multiple different Ruby/gems files including RVM. It 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 have tried renaming it as well (Rakefile.rb, rakefile).
When I run Rake commands such as rake db:migrate
, I get this error:
rake aborted! 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:inrequire' /Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in
block in require' /Users/me/.rvm/gems/ruby-2.1.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:inload_dependency' /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/railties-4.0.2/lib/rails/application.rb:189:inrequire_environment!' /Users/me/.rvm/gems/ruby-2.1.0/gems/railties-4.0.2/lib/rails/application.rb:250:in
block in run_tasks_blocks' /Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:ineval' /Users/me/.rvm/gems/ruby-2.1.0/bin/ruby_executable_hooks:15:in
' Tasks: TOP => db:migrate => environment (See full trace by running task with --trace)
I've looked everywhere for the solution before coming here, but I could not find it. I would be appreciative if someone could give me some advice on this issue. Thank you in advance.