On 29 November 2010 16:08, Steve Mills <li...@ruby-forum.com> wrote:
> OK. I now know why this is happening but I don't know what to do to fix
> it...
>
> in the "app" folder is a file "store.rb" and this contains the following
> lines...
>
> ActiveRecord::Base.establish_connection(
>  :adapter => 'sqlite3',
>  :database => 'db/development.sqlite3')
>
> It is these lines that are causing the problem since I am not using
> sqlite3 but rather mysql2.
>
> I don't know how to fix this. I tried the following...
>
> ActiveRecord::Base.establish_connection(
>  :adapter => 'mysql2',
>  :database => 'db/development.mysql2')

Presumably you do not know why store.rb is attempting to open a
separate connect to the (or a different) database.  Presumably also
you inherited this code.  If you cannot contact the original developer
or do not have documentation for it then you are just going to have to
slog through the code trying to work it out.  Personally I would start
by just removing that code and see what happens (or even remove
store.rb, what is it doing in the app folder anyway?).  If you have
tests then see if they run, otherwise write them.

Colin

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to