title: cannot load railtie after upgrade to rails 4 per ruby.railstutorial.org
body: <p>OS is Ubuntu 12.04, 64 bit.</p>
  
  <p>New to rails. Relatively new to Ruby. Following the ruby.railstutorial.org tutorial, chapter 3. </p>
  
  <p>The tutorial has been updated to use ruby 2.0.0 and Rails 4.0.0.rc1. Previously the gemfile was specifying Rails 3.2.13 and not specifying Ruby version. After moving to the latest Gemfile in the tutorial, ruby 2.0.0 and Rails 4.0.0.rc1, I'm getting the following error when running rails commands. Example here is <em>rails server</em></p>
  
  <pre><code>    user@machine:~/bin/railslearn/sample_app$ rails server
  /home/paul/bin/railslearn/sample_app/config/application.rb:7:in `require': cannot load such file -- active_resource/railtie (LoadError)
      from /home/paul/bin/railslearn/sample_app/config/application.rb:7:in `&lt;top (required)&gt;'
      from /home/paul/.rvm/gems/ruby-2.0.0-p195@railstutorial_rails_4_0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `require'
      from /home/paul/.rvm/gems/ruby-2.0.0-p195@railstutorial_rails_4_0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:78:in `block in &lt;top (required)&gt;'
      from /home/paul/.rvm/gems/ruby-2.0.0-p195@railstutorial_rails_4_0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `tap'
      from /home/paul/.rvm/gems/ruby-2.0.0-p195@railstutorial_rails_4_0/gems/railties-4.0.0.rc1/lib/rails/commands.rb:75:in `&lt;top (required)&gt;'
      from script/rails:6:in `require'
      from script/rails:6:in `&lt;main&gt;'
  </code></pre>
  
  <p>I did get some ideas from <a href="https://stackoverflow.com/questions/9212116/rails-could-not-find-railties">Rails: Could not find railties</a>, outlined below, but haven't yet found a fix.</p>
  
  <p>Here's the details.</p>
  
  <p>Yesterday (in my browser) the Gemfile for Chapter 3 was as follows. Everything worked fine.</p>
  
  <pre><code>$ cat Gemfile
  source 'https://rubygems.org'
  
  gem 'rails', '3.2.13'
  gem 'bootstrap-sass', '2.1'
  gem 'bcrypt-ruby', '3.0.1'
  gem 'faker', '1.0.1'
  gem 'will_paginate', '3.0.3'
  gem 'bootstrap-will_paginate', '0.0.6'
  gem 'jquery-rails', '2.0.2'
  
  group :development, :test do
    gem 'sqlite3', '1.3.5'
    gem 'rspec-rails', '2.11.0'
    # gem 'guard-rspec', '1.2.1'
    # gem 'guard-spork', '1.2.0'  
    # gem 'childprocess', '0.3.6'
    # gem 'spork', '0.9.2'
  end
  
  # Gems used only for assets and not required
  # in production environments by default.
  group :assets do
    gem 'sass-rails',   '3.2.5'
    gem 'coffee-rails', '3.2.2'
    gem 'uglifier', '1.2.3'
  end
  
  group :test do
    gem 'capybara', '1.1.2'
    gem 'factory_girl_rails', '4.1.0'
    gem 'cucumber-rails', '1.2.1', :require =&gt; false
    gem 'database_cleaner', '0.7.0'
    # gem 'launchy', '2.1.0'
    # gem 'rb-fsevent', '0.9.1', :require =&gt; false
    # gem 'growl', '1.0.3'
  end
  
  group :production do
    gem 'pg', '0.12.2'
  end
  </code></pre>
  
  <p>This morning the Gemfiles in the tutorial are using ruby 2.0.0 and rails 4.0.0.rc1. I'd like to get this setup working, so I don't have conflicts with the updated tutorial. New Gemfile is as follows.</p>
  
  <pre><code>$ cat Gemfile
  source 'https://rubygems.org'
  ruby '2.0.0'
  
  gem 'rails', '4.0.0.rc1'
  
  group :development, :test do
    gem 'sqlite3', '1.3.7'
    gem 'rspec-rails', '2.13.1'
  end
  
  group :test do
    gem 'selenium-webdriver', '2.0.0'
    gem 'capybara', '2.1.0'
  end
  
  gem 'sass-rails', '4.0.0.rc1'
  gem 'uglifier', '2.1.1'
  gem 'coffee-rails', '4.0.0'
  gem 'jquery-rails', '2.2.1'
  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'
  end
  </code></pre>
  
  <p>First I changed the ruby version in the Gemfile to ruby '1.9.2' because that's what I was running, and think I had an error with bundle update. I didn't take notes. </p>
  
  <p>Then changed the ruby version back to '2.0.0' in the Gemfile and:</p>
  
  <pre><code>$ rvm install 2.0.0
  $ rvm use 2.0.0 --default
  $ bundle update
  $ bundle install
  </code></pre>
  
  <p>Now I'm getting the <em>cannot load railtie</em> error with rails commands. </p>
  
  <p>From <a href="https://stackoverflow.com/questions/9212116/rails-could-not-find-railties">Rails: Could not find railties</a>, I tried the following</p>
  
  <pre><code>$ gem uninstall railties
  
  Select gem to uninstall:
   1. railties-4.0.0.rc1
   2. railties-3.2.13
   3. All versions
  &gt; 2
  
  You have requested to uninstall the gem:
      railties-3.2.13
  
  rails-3.2.13 depends on railties (= 3.2.13)
  If you remove this gem, these dependencies will not be met.
  Y # uninstall railties-3.2.13
  </code></pre>
  
  <p>still getting the error</p>
  
  <pre><code>$ gem uninstall rails # to uninstall rails-3.2.13
  $ gem uninstall railties # to also uninstall railties-4.0.0.rc1
  $ rvm reinstall 2.0.0
  $ rvm 2.0.0 --default
  $ bundle update # using the Gemfile with ruby 2, rails 4
  $ bundle install
  
  $ gem list | grep rail
  coffee-rails (4.0.0)
  jquery-rails (2.2.1)
  rails (4.0.0.rc1)
  railties (4.0.0.rc1)
  rspec-rails (2.13.1)
  sass-rails (4.0.0.rc1)
  sprockets-rails (2.0.0.rc4)
  </code></pre>
  
  <p>still getting the error</p>
  
  <p>Going back through the original setup from the tutorial in chapter one (now updated for ruby 2, rails 4.)</p>
  
  <pre><code>$ rvm use 2.0.0@railstutorial_rails_4_0 --create --default
  $ gem update --system 2.0.0
  $ gem install rails --version 4.0.0.rc1 --no-ri --no-rdoc
  $ bundle update # using Gemfile with ruby 2, rails 4
  $ bundle install
  </code></pre>
  
  <p>still getting the error</p>
  
  <p>ug!!!</p>
  
  <p>Any ideas?</p>