I''ve written a RESTful web service using Rails 1.2 and now I''m
trying
to upgrade to Rails 2.0, but it seems to insist that I have a database
configured. Previously I had the following code in
config/environment.rb and that seemed to be sufficient:
def config.database_configuration
class << ActiveRecord::Base
def establish_connection(spec = nil)
nil
end
end
nil
end
After the upgrade, running rake test:units results in a
ActiveRecord::ConnectionNotEstablished because the abstract connection
adapter in AR was trying to retrieve the current database connection.
So overriding establish_connection no longer appears to work in Rails
2.
Then I saw that adding this to environment.rb would apparently do the trick:
config.frameworks -= [ :active_record ]
But alas, doing that causes missing dependencies for active_support
and other plugins, so that won''t work either.
Aside from biting the bullet and using sqlite, is there a way to
configure Rails 2 so that it will not use a database?
Thanks
n
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---