What''s the best way to exclude ActiveRecord in Rails3? In Rails2, one could just do: *config.frameworks -= [ :active_record ]* in the configuration block in environment.rb. Is it possible in Rails3? Thanks. Anuj -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
As far as I know the way to do this is to change this line in config/application.rb: require "rails/all" To these lines (this is most of the code from "rails/all"): require "rails" %w( action_controller action_mailer active_resource rails/test_unit ).each do |framework| begin require "#{framework}/railtie" rescue LoadError end end I''ve removed active_record from the above array. On 2 September 2010 11:07, Anuj Dutta <dutta.anuj@googlemail.com> wrote:> What''s the best way to exclude ActiveRecord in Rails3? > > > In Rails2, one could just do: > > *config.frameworks -= [ :active_record ]* > > in the configuration block in environment.rb. Is it possible in Rails3? > > Thanks. > > Anuj > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Thanks. I thought there might be a better way to achieve the same. Anuj On 2 September 2010 02:14, Ryan Bigg <radarlistener@gmail.com> wrote:> As far as I know the way to do this is to change this line in > config/application.rb: > > require "rails/all" > > To these lines (this is most of the code from "rails/all"): > > require "rails" > > %w( > action_controller > action_mailer > active_resource > rails/test_unit > ).each do |framework| > begin > require "#{framework}/railtie" > rescue LoadError > end > end > > I''ve removed active_record from the above array. > > > On 2 September 2010 11:07, Anuj Dutta <dutta.anuj@googlemail.com> wrote: > >> What''s the best way to exclude ActiveRecord in Rails3? >> >> >> In Rails2, one could just do: >> >> *config.frameworks -= [ :active_record ]* >> >> in the configuration block in environment.rb. Is it possible in Rails3? >> >> Thanks. >> >> Anuj >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. >-- Anuj DUTTA -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
For a new application, you can do: rails new myapp --skip-active-record Em 01-09-2010 22:17, Anuj Dutta escreveu:> Thanks. I thought there might be a better way to achieve the same. > > Anuj > > On 2 September 2010 02:14, Ryan Bigg <radarlistener@gmail.com > <mailto:radarlistener@gmail.com>> wrote: > > As far as I know the way to do this is to change this line in > config/application.rb: > > require "rails/all" > > To these lines (this is most of the code from "rails/all"): > > require "rails" > > %w( > action_controller > action_mailer > active_resource > rails/test_unit > ).each do |framework| > begin > require "#{framework}/railtie" > rescue LoadError > end > end > > I''ve removed active_record from the above array. > > > On 2 September 2010 11:07, Anuj Dutta <dutta.anuj@googlemail.com > <mailto:dutta.anuj@googlemail.com>> wrote: > > What''s the best way to exclude ActiveRecord in Rails3? > > > In Rails2, one could just do: > > *config.frameworks -= [ :active_record ]* > > in the configuration block in environment.rb. Is it possible > in Rails3? > > Thanks. > > Anuj > > -- > You received this message because you are subscribed to the > Google Groups "Ruby on Rails: Core" group. > To post to this group, send email to > rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com > <mailto:rubyonrails-core%2Bunsubscribe@googlegroups.com>. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Core" group. > To post to this group, send email to > rubyonrails-core@googlegroups.com > <mailto:rubyonrails-core@googlegroups.com>. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com > <mailto:rubyonrails-core%2Bunsubscribe@googlegroups.com>. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > > > > -- > Anuj DUTTA > -- > You received this message because you are subscribed to the Google > Groups "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Aha...cool. Thanks. Anuj On 2 September 2010 02:20, Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>wrote:> For a new application, you can do: > > rails new myapp --skip-active-record > > Em 01-09-2010 22:17, Anuj Dutta escreveu: > >> Thanks. I thought there might be a better way to achieve the same. >> >> Anuj >> >> On 2 September 2010 02:14, Ryan Bigg <radarlistener@gmail.com <mailto: >> radarlistener@gmail.com>> wrote: >> >> As far as I know the way to do this is to change this line in >> config/application.rb: >> >> require "rails/all" >> >> To these lines (this is most of the code from "rails/all"): >> >> require "rails" >> >> %w( >> action_controller >> action_mailer >> active_resource >> rails/test_unit >> ).each do |framework| >> begin >> require "#{framework}/railtie" >> rescue LoadError >> end >> end >> >> I''ve removed active_record from the above array. >> >> >> On 2 September 2010 11:07, Anuj Dutta <dutta.anuj@googlemail.com >> <mailto:dutta.anuj@googlemail.com>> wrote: >> >> What''s the best way to exclude ActiveRecord in Rails3? >> >> >> In Rails2, one could just do: >> >> *config.frameworks -= [ :active_record ]* >> >> in the configuration block in environment.rb. Is it possible >> in Rails3? >> >> Thanks. >> >> Anuj >> >> -- You received this message because you are subscribed to >> the >> Google Groups "Ruby on Rails: Core" group. >> To post to this group, send email to >> rubyonrails-core@googlegroups.com >> <mailto:rubyonrails-core@googlegroups.com>. >> >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >> <mailto:rubyonrails-core%2Bunsubscribe@googlegroups.com<rubyonrails-core%252Bunsubscribe@googlegroups.com> >> >. >> >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> >> >> -- You received this message because you are subscribed to the >> Google >> Groups "Ruby on Rails: Core" group. >> To post to this group, send email to >> rubyonrails-core@googlegroups.com >> <mailto:rubyonrails-core@googlegroups.com>. >> >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >> <mailto:rubyonrails-core%2Bunsubscribe@googlegroups.com<rubyonrails-core%252Bunsubscribe@googlegroups.com> >> >. >> >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> >> >> >> >> -- >> Anuj DUTTA >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to rubyonrails-core@googlegroups.com. > To unsubscribe from this group, send email to > rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > >-- Anuj DUTTA -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Yup, that basically does what Ryan mentioned, changes rails/all to load individual frameworks (excluding activerecord ofcourse) Anuj On 2 September 2010 02:21, Anuj Dutta <dutta.anuj@googlemail.com> wrote:> Aha...cool. Thanks. > > Anuj > > > On 2 September 2010 02:20, Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com>wrote: > >> For a new application, you can do: >> >> rails new myapp --skip-active-record >> >> Em 01-09-2010 22:17, Anuj Dutta escreveu: >> >>> Thanks. I thought there might be a better way to achieve the same. >>> >>> Anuj >>> >>> On 2 September 2010 02:14, Ryan Bigg <radarlistener@gmail.com <mailto: >>> radarlistener@gmail.com>> wrote: >>> >>> As far as I know the way to do this is to change this line in >>> config/application.rb: >>> >>> require "rails/all" >>> >>> To these lines (this is most of the code from "rails/all"): >>> >>> require "rails" >>> >>> %w( >>> action_controller >>> action_mailer >>> active_resource >>> rails/test_unit >>> ).each do |framework| >>> begin >>> require "#{framework}/railtie" >>> rescue LoadError >>> end >>> end >>> >>> I''ve removed active_record from the above array. >>> >>> >>> On 2 September 2010 11:07, Anuj Dutta <dutta.anuj@googlemail.com >>> <mailto:dutta.anuj@googlemail.com>> wrote: >>> >>> What''s the best way to exclude ActiveRecord in Rails3? >>> >>> >>> In Rails2, one could just do: >>> >>> *config.frameworks -= [ :active_record ]* >>> >>> in the configuration block in environment.rb. Is it possible >>> in Rails3? >>> >>> Thanks. >>> >>> Anuj >>> >>> -- You received this message because you are subscribed to >>> the >>> Google Groups "Ruby on Rails: Core" group. >>> To post to this group, send email to >>> rubyonrails-core@googlegroups.com >>> <mailto:rubyonrails-core@googlegroups.com>. >>> >>> To unsubscribe from this group, send email to >>> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >>> <mailto:rubyonrails-core%2Bunsubscribe@googlegroups.com<rubyonrails-core%252Bunsubscribe@googlegroups.com> >>> >. >>> >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-core?hl=en. >>> >>> >>> -- You received this message because you are subscribed to the >>> Google >>> Groups "Ruby on Rails: Core" group. >>> To post to this group, send email to >>> rubyonrails-core@googlegroups.com >>> <mailto:rubyonrails-core@googlegroups.com>. >>> >>> To unsubscribe from this group, send email to >>> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >>> <mailto:rubyonrails-core%2Bunsubscribe@googlegroups.com<rubyonrails-core%252Bunsubscribe@googlegroups.com> >>> >. >>> >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-core?hl=en. >>> >>> >>> >>> >>> -- >>> Anuj DUTTA >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Ruby on Rails: Core" group. >>> To post to this group, send email to rubyonrails-core@googlegroups.com. >>> To unsubscribe from this group, send email to >>> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >>> . >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-core?hl=en. >>> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> To post to this group, send email to rubyonrails-core@googlegroups.com. >> To unsubscribe from this group, send email to >> rubyonrails-core+unsubscribe@googlegroups.com<rubyonrails-core%2Bunsubscribe@googlegroups.com> >> . >> For more options, visit this group at >> http://groups.google.com/group/rubyonrails-core?hl=en. >> >> > > > -- > Anuj DUTTA >-- Anuj DUTTA -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-core+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
Seemingly Similar Threads
- Trouble developing Rails plugins/gems with generators
- Sharing sessions between a rails3 app and a rails2 app. Rails 2 app crashes.
- couldn't find file 'jquery' rails 3.1 stable mountable engine
- [threadsafe] Arel ToSql visitor is not threadsafe
- MySql2 adapter hangs in Rails3 on Windows XP