madd02
10-13-2006, 01:28 PM
I was having troubles with a new application im trying to deploy so decided to get a test app working to verify the environment.
To make sure i performed the setup correctally i followed the 'Using Ruby On Rails on Bluehost:' tutorial.
% rails first
% cd first
% cd ~/public_html/
% rm -r first
% ln -s /home/YOUR_USERNAME/rails/first/public first
Then i setup the subdomain and test the application. It works, and i get the welcome screen. Clicking on 'About your application’s environment' i get the your not authorized to view from remote message.
After creating the database and user i alter the database.yml file to contain the correct connection information.
Now, if i return to my welcome screen and select 'About your application’s environment' i get:
Application error
Rails application failed to start properly"
This is further confirmed when trying to run any of the rails scripts.
eg to get the generate help up:
./script/generate
Below is a dump of my ssh session:
[~]# cd rails
[~/rails]# cd test
[~/rails/test]# rails --version
Rails 1.1.6
[~/rails/test]# ./script/generate
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_ada pters/abstract/connection_specification.rb:194:in `establish_connection': develo pment database is not configured (ActiveRecord::AdapterNotSpecified)
from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/c onnection_adapters/abstract/connection_specification.rb:185:in `establish_connec tion'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:182:in ` initialize_database'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:in `p rocess'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in `r un'
from ./script/../config/../config/environment.rb:13
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `requi re'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/generate.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `requi re'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'
from ./script/generate:3
When changing my database.yml file back to the gerenated content there is no longer an applicaiton error on the welsome screen (under about your applicaitons environment)
Also, strange is that i have an applicaiton that i created months ago that is still working. The problem appears t only be for new applications.
To make sure i performed the setup correctally i followed the 'Using Ruby On Rails on Bluehost:' tutorial.
% rails first
% cd first
% cd ~/public_html/
% rm -r first
% ln -s /home/YOUR_USERNAME/rails/first/public first
Then i setup the subdomain and test the application. It works, and i get the welcome screen. Clicking on 'About your application’s environment' i get the your not authorized to view from remote message.
After creating the database and user i alter the database.yml file to contain the correct connection information.
Now, if i return to my welcome screen and select 'About your application’s environment' i get:
Application error
Rails application failed to start properly"
This is further confirmed when trying to run any of the rails scripts.
eg to get the generate help up:
./script/generate
Below is a dump of my ssh session:
[~]# cd rails
[~/rails]# cd test
[~/rails/test]# rails --version
Rails 1.1.6
[~/rails/test]# ./script/generate
/usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/connection_ada pters/abstract/connection_specification.rb:194:in `establish_connection': develo pment database is not configured (ActiveRecord::AdapterNotSpecified)
from /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/active_record/c onnection_adapters/abstract/connection_specification.rb:185:in `establish_connec tion'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:182:in ` initialize_database'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:84:in `p rocess'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/initializer.rb:42:in `r un'
from ./script/../config/../config/environment.rb:13
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `requi re'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'
from /usr/lib/ruby/gems/1.8/gems/rails-1.1.6/lib/commands/generate.rb:1
from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `requi re'
from /usr/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/ dependencies.rb:147:in `require'
from ./script/generate:3
When changing my database.yml file back to the gerenated content there is no longer an applicaiton error on the welsome screen (under about your applicaitons environment)
Also, strange is that i have an applicaiton that i created months ago that is still working. The problem appears t only be for new applications.