I was getting an error with my application, so I looked on stack and found an answer undefined method `require_relative' for main:Object (NoMethodError) it said that I should run gem install rails
which I did, after I ran that, when I tried to run rails generate controller StaticPages home help --no-test-framework
I got an error:
(in /usr/local/rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rails-0.9.5)
rake aborted!
ERROR: 'rake/rdoctask' is obsolete and no longer supported. Use 'rdoc/task' (available in RDoc 2.4.2+) instead.
/usr/local/rvm/gems/ruby-2.0.0-p247@railstutorial_rails_4_0/gems/rails-0.9.5/Rakefile:3:in `<top (required)>'
It says that I am running rails .95 and even when I ran gem update rails
nothing happend
Here is my gemfile
source 'https://rubygems.org'
ruby '2.0.0'
gem 'rails', '4.0.2'
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
end
gem 'sass-rails', '4.0.1'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
end