Welcome Guest | Login

mysql adapter error

i fail with this error

Application error
Rails application failed to start properly
----------
Caused by this error, anyone know why?

(Terminal trace)
# ruby dispatch.fcgi
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:231:in `establish_connection': Please install the MySql adapter: `gem install activerecord-MySql-adapter` (no such file to load -- active_record/connection_adapters/MySql_adapter) (RuntimeError)
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:215:in `establish_connection'
from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/connection_specification.rb:208:in `establish_connection'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:234:in `initialize_database'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:94:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'
from ./../config/environment.rb:13
from dispatch.fcgi:21:in `require'
from dispatch.fcgi:21

# gem install activerecord-MySql-adapter
Bulk updating Gem source index for: http://gems.rubyforge.org/
ERROR:  could not find activerecord-MySql-adapter locally or in a repository


Please help!

2008-06-15 08:19 PM

Hi - I am getting a different error while running your dispatch.fcgi. Please check it again at your end. Could you please try freezing the correct version of rails in your application folder ?

2008-06-15 09:19 PM

HostingRails Support
You are correct, i was trying a few things and i didnt get the most recent error, sorry. heres the newest trace which also confuses me.



# ./dispatch.fcgi
/usr/local/lib/ruby/gems/1.8/gems/activerecord-2.0.2/lib/active_record/base.rb:1532:in `method_missing': undefined method `include_root_in_json=' for ActiveRecord::Base:Class (NoMethodError)
from /home/nutheor/nutheory20/config/initializers/new_rails_defaults.rb:5
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:342:in `load_application_initializers'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:341:in `each'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:341:in `load_application_initializers'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:116:in `process'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `send'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.0.2/lib/initializer.rb:49:in `run'
from ./../config/environment.rb:13
from ./dispatch.fcgi:21:in `require'
from ./dispatch.fcgi:21

2008-06-15 09:42 PM

Hi,

I ran a script/console from RAILS_ROOT of your app and ggot the below initially.  

======
':ActiveRecord::AdapterNotSpecified: development database is not configured
======

I added the entry below into your ~app/config/database.yml and could get past the error.

======
development:
 adapter: mysql
 database: username_production
 username: username_drush
 password: password
======

Now when I run script/console I'm seeing the errors below.

======
`method_missing':NoMethodError: undefined method `include_root_in_json=' for ActiveRecord::Base:Class
dependencies.rb:478:in `const_missing':NameError: uninitialized constant ApplicationController::AuthenticatedSystem
=======

The line "#ActiveRecord::Base.include_root_in_json = true" is usually included inrails/railties/configs/initializers/new_rails_defaults.rb

If you try freezing rails version required for this app the error may go away. For example, you need to run the command below to freeze rails to 1.2.5 version.

rake rails:freeze:edge TAG=rel_1-2-5








2008-06-16 01:10 AM

i looked for this file, inrails/railties/configs/initializers/new_rails_defaults.rb

i didnt see it.

heres the butt of the trace from running your rake..


A    vendor/rails/activesupport/MIT-LICENSE
A    vendor/rails/activesupport/README
Exported revision 9250.
svn: URL http://dev.rubyonrails.org/svn/rails/tags/rel_1-2-5/activeresource' doesn't exist
nutheor@nutheory.com [~/nutheory20]# rake rails:freeze:edge TAG=rel_1-2-5
(in /home/nutheor/nutheory20)
rake aborted!
undefined method `install_gem_spec_stubs' for #<Rails::Initializer:0xb7ce833c>
/home/nutheor/nutheory20/Rakefile:4
(See full trace by running task with --trace)



why is this so difficult, i am grateful for your  help (really grateful), but i never had these problems on a ms box with c#. i wanna kick myself for saying that but its true.

2008-06-16 01:23 AM

Nutheory, I was just giving you an example on how to freeze rails to a particular version. To freeze Rails to the version 1-2-5, you need it installed on the server, which is *not currently. You might want to freeze it to the rails version on your development machine if this app is working fine on it.  you can also try freezing to a rails version 2.0.2 which is currently defined in your app's config/environment.rb . Sorry for being ambiguous earlier.  

2008-06-16 02:21 AM

sorry but server are my week spot. i did freeze things though.

# cd nuthery20/public
-jailshell: cd: nuthery20/public: No such file or directory
# cd nutheory20/public
# rake rails:freeze:edge TAG=rel_2.0.2
(in /home/---/nutheory20)
rake aborted!
undefined method `install_gem_spec_stubs' for #<Rails::Initializer:0xb7cfc288>
/home/---/nutheory20/Rakefile:4
(See full trace by running task with --trace)

# rake--trace  rails:freeze:edge TAG=rel_1-2-5
-jailshell: rake--trace: command not found
# rake--trace  rails:freeze:edge TAG=2.0.2    
-jailshell: rake--trace: command not found
# rake--trace  rails:freeze:edge TAG=rel_2_0-2
-jailshell: rake--trace: command not found
# rake--trace  rails:freeze:edge TAG=rel_2_0_2
-jailshell: rake--trace: command not found
# rake -- force --trace  rails:freeze:edge TAG=rel_2_0_2
(in ----)
rake aborted!
undefined method `install_gem_spec_stubs' for #<Rails::Initializer:0xb7c96208>
/home/---/nutheory20/Rakefile:4

2008-06-16 02:42 AM

Hi - You need to execute the command from your rails_root directory and not from the public directory.  Also please do not post your user specific details in the form. Thank you

2008-06-16 02:15 PM

HostingRails Support
ok i froze it, now what?

2008-06-16 03:57 PM

Hi - Could you please try running ./dispatch.fcgi from your public folder and see if you are getting any errors ?

2008-06-16 06:39 PM

HostingRails Support
new odd trace

# ./dispatch.fcgi
./../config/../vendor/rails/railties/lib/initializer.rb:49:in `send': undefined method `install_gem_spec_stubs' for #<Rails::Initializer:0xb7f75b2c> (NoMethodError)
from ./../config/../vendor/rails/railties/lib/initializer.rb:49:in `run'
from ./../config/boot.rb:46:in `load_initializer'
from ./../config/boot.rb:38:in `run'
from ./../config/boot.rb:11:in `boot!'
from ./../config/boot.rb:109
from ./../config/environment.rb:11:in `require'
from ./../config/environment.rb:11
from ./dispatch.fcgi:21:in `require'
from ./dispatch.fcgi:21

2008-06-16 11:32 PM

Hi,

The links below might be of help.http://railsforum.com/viewtopic.php?id=17990http://groups.google.com/group/rubyonrails-talk/browse_thread/thread/b60719e5f8b80134


2008-06-17 03:05 AM

# ./dispatch.fcgi
/home/---/nutheory20/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:492:in `const_missing': uninitialized constant ApplicationController::AuthenticatedSystem (NameError)
from /home/---/nutheory20/app/controllers/application.rb:7
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /home/---/nutheory20/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:509:in `require'
from /home/---/nutheory20/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:354:in `new_constants_in'
from /home/---/nutheory20/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:509:in `require'
from /home/---/nutheory20/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:101:in `require_or_load'
from /home/---/nutheory20/vendor/rails/activerecord/lib/../../activesupport/lib/active_support/dependencies.rb:60:in `depend_on'
 ... 14 levels...
from ./../config/../vendor/rails/railties/lib/initializer.rb:93:in `run'
from ./../config/environment.rb:13
from ./dispatch.fcgi:21:in `require'
from ./dispatch.fcgi:21

2008-06-18 02:00 AM

Hi Nutheory,

It seems like the plugin required for the authentication: acts_as_authentiocation/restful_authentication is not properly installed. Could you please give a try after reinstalling the authentication plugin.

2008-06-18 04:14 PM


Hello Guest! In order to post you must be an active client with us, please log in or sign up.