Updated rails install instructions #79

Closed
wants to merge 1 commit into
from

3 participants

@Xylakant

activeresource must be required as well.

@Xylakant Xylakant Updated rails install instructions
activeresource must be required as well.
1135431
@Xylakant

refs #78

@langalex
Owner

I don't think activeresource is needed. It's actually removed from Rails 4.

you get the crash described in #78 when you don't include it:

[vagrant@tech-demo]$ bin/rails s
LoadError: no such file to load -- active_resource/railtie
  require at org/jruby/RubyKernel.java:1027
   (root) at /home/vagrant/tech-demo/config/application.rb:7
  require at org/jruby/RubyKernel.java:1027
   (root) at /usr/local/rvm/gems/jruby-1.7.2/gems/railties-3.2.12/lib/rails/commands.rb:1
      tap at org/jruby/RubyKernel.java:1754
   (root) at /usr/local/rvm/gems/jruby-1.7.2/gems/railties-3.2.12/lib/rails/commands.rb:53
  require at org/jruby/RubyKernel.java:1027
   (root) at script/rails:6

adding activeresouce to the gemfile fixes this.

Owner

ok I checked one of my recent projects and here's what I actually do:

  • require 'rails' in Gemfile
  • in application.rb require "action_controller/railtie" and whatever else you need (which in most cases excludes active_record)
@m1foley

FWIW, I use the following for my project that doesn't require ActiveRecord nor ActiveResource:

Gemfile:

gem 'railties',         '= 3.2.12'
gem 'actionpack',       '= 3.2.12'
gem 'actionmailer',     '= 3.2.12'
gem 'activemodel',      '= 3.2.12'
gem 'tzinfo',           '>= 0.3.36'

config/application.rb:

require "action_controller/railtie"
require "action_mailer/railtie"
require "rails/test_unit/railtie"
require "sprockets/railtie"
@langalex langalex closed this May 18, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment