Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 596451
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:10:24+00:00 2026-05-13T16:10:24+00:00

Now that Rails 3 beta is out, I thought I’d have a look at

  • 0

Now that Rails 3 beta is out, I thought I’d have a look at rewriting an app I have just started work on in Rails 3 beta, both to get a feel for it and get a bit of a head-start. The app uses MongoDB and MongoMapper for all of its models and therefore has no need for ActiveRecord. In the previous version, I am unloading activerecord in the following way:

config.frameworks -= [ :active_record ]    # inside environment.rb

In the latest version this does not work – it just throws an error:

/Library/Ruby/Gems/1.8/gems/railties-3.0.0.beta/lib/rails/configuration.rb:126:in
  `frameworks': config.frameworks in no longer supported. See the generated 
  config/boot.rb for steps on how to limit the frameworks that will be loaded 
  (RuntimeError)
 from *snip*

Of course, I have looked at the boot.rb as it suggested, but as far as I can see, there is no clue here as to how I might go about unloading AR. The reason I need to do this is because not only is it silly to be loading something I don’t want, but it is complaining about its inability to make a DB connection even when I try to run a generator for a controller. This is because I’ve wiped database.yml and replaced it with connection details for MongoDB in order to use this gist for using database.yml for MongoDB connection details. Not sure why it needs to be able to initiate a DB connection at all just to generate a controller anyway….

Is anyone aware of the correct Rails 3 way of doing this?

  • 1 1 Answer
  • 4 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:10:24+00:00Added an answer on May 13, 2026 at 4:10 pm

    I’m going by this from reading the source, so let me know if it actually worked. 🙂

    The rails command that generates the application template now has an option -O, which tells it to skip ActiveRecord.

    If you don’t feel like rerunning rails, you should check the following in your existing app:

    • Check that your config/application.rb doesn’t have require 'rails/all' or require "active_record/railtie". Instead, for a standard Rails setup without ActiveRecord, it should have only the following requires:

      require File.expand_path('../boot', __FILE__)
      
      require "action_controller/railtie"
      require "action_mailer/railtie"
      require "active_resource/railtie"
      require "rails/test_unit/railtie"
      require "sprockets/railtie"
      
      # Auto-require default libraries and those for the current Rails environment. 
      Bundler.require :default, Rails.env
      
    • If, in config/application.rb, you are using the config.generators section, make sure it doesn’t have the line g.orm :active_record. You can set this explicitly to nil, if you want, but this should be the default when g.orm is completely omitted.

    • Optional, but in your Gemfile, remove the gem line that loads the module for your database. This could be the line gem "mysql" for example.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a rails 3 app in beta right now that uses Devise for
So I'm getting started learning Rails. Now that Rails 3 is out, I want
Now that I have a working Rails 3 web app, I'd like to make
new on rails and using windows for now,, i have web page that user
I've been working on a rails app for a couple of days now that
I'm working on implementing javascript functionality in my rails 3 app. Now that rjs
I have a rails app that I've been testing on heroku, it's a simple
Now that Rails 3 is out, my favorite dev-mode plugin (rails-dev-boost) is broken. I'm
I installed imagemagick in my rails app and now that I am trying to
Hi I have a table in my rails app that doesnt have any id

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.