I have been trying to upgrade my rails app that I haven't touched for years. I have looked at this answer here RoR 3 Undefined Method 'task' and that has not worked.
My set up is this too: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14] Rails 4.2.4
When I run rake db migrate I get the following error:
Zacharys-MacBook-Pro:start-stop-note zak$ rake db:migrate
/Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/lib/rake/alt_system.rb:32:in `<module:AltSystem>': uninitialized constant Rake::AltSystem::Config (NameError)
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/lib/rake/alt_system.rb:31:in `<top (required)>'
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/lib/rake/win32.rb:3:in `require'
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/lib/rake/win32.rb:3:in `<module:Rake>'
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/lib/rake/win32.rb:2:in `<top (required)>'
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/lib/rake.rb:41:in `require'
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/lib/rake.rb:41:in `<top (required)>'
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/bin/rake:26:in `require'
from /Users/zak/.rvm/gems/ruby-2.2.1/gems/rake-0.8.7/bin/rake:26:in `<top (required)>'
from /Users/zak/.rvm/gems/ruby-2.2.1/bin/rake:23:in `load'
from /Users/zak/.rvm/gems/ruby-2.2.1/bin/rake:23:in `<main>'
from /Users/zak/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
from /Users/zak/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'
Zacharys-MacBook-Pro:start-stop-note zak$
Here is my gem file:
source 'http://rubygems.org'
gem 'rails'
gem 'pg'
# Asset template engines
gem 'sass'
gem 'coffee-script'
gem 'coffeebeans'
gem 'uglifier'
gem 'jquery-rails'
gem 'omniauth'
gem 'cancan'
gem 'heroku'
gem 'acts-as-taggable-on'
gem 'texticle'
gem 'sass-rails'
# Set rake specifically to avoid error on heroku
gem 'rake', '~> 0.8.7'
group :development do
gem 'populator'
gem 'heroku_san'
end
group :development, :test do
gem 'rspec-rails'
gem 'awesome_print'
end
group :test do
# Pretty printed test output
gem 'turn', :require => false
gem 'autotest'
gem 'cucumber-rails'
gem 'capybara'
gem 'database_cleaner'
gem 'test_notifier'
end
group :production do
gem 'heroku_backup_task'
en
I am getting a notice, when I cd into the app, that the wrong version of ruby is being used. But I can't update this via rvm running el capitan:
ruby-1.9.2-p330 is not installed.
To install do: 'rvm install ruby-1.9.2-p330'
Zacharys-MacBook-Pro:start-stop-note zak$ rvm install ruby-1.9.2-p330
Warning! PATH is not properly set up, $GEM_HOME is not set,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
to fix temporarily in this shell session run: 'rvm use ruby-2.2.1'.
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-1.9.2-p330.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
RVM does not know how to build working ruby-1.9.2-p330 on OSX 10.11,
if you know please let us know by opening a ticket with instructions here:
https://github.com/rvm/rvm/issues