View Full Version : rails database.yml
timberford
03-13-2006, 07:51 AM
can someone please post up their db connection configuration. obviously i dont need your user name and password, but i just want to check mine is set up correctly.
thanks.
In working through issues on my home setup I found that the rails default yml needed to be modified to include the host. I added the bottom line here:
adapter: mysql
database: depot_development
host:localhost
I also entered my username and password but left:
socket: /path/to/your/mysql.sock
alone because I still don't know what to do with that in my windows configuration.
I would guess that on BH you may need to specify your host if you've not done so.
good luck, and let us know what works!
joe
rando
03-13-2006, 12:05 PM
Also remember that on bluehost, your username is prepended to your database names / database users. So, if your username is happyman, the user would be happyman_rails and the db would be happyman_appnamedevel or something along those lines.
If so, would you mind sharing?
joe
timberford
03-14-2006, 07:24 AM
i've eliminated my database.yml as the cause of my application not working. in the end i created a test app and took the database.yml created and altered the login details as necessary just to double check and it made no difference.
rando
03-14-2006, 07:48 AM
What is your problem, exactly? What's happening?
timberford
03-14-2006, 07:51 AM
i get rails has failed to start application error...
http://www.paulsturgess.co.uk
i have created a fresh app and it works, well when you click to view 'about your application environment' it says something along the lines of this can only be read locally for security reasons. i take this to mean it's all working.
so then i have copied over my application bit by bit and i can get my 'config' folder over and my 'public' folder and all is fine. but as soon as i put my 'app' folder over then i get the rails has failed to start error. i really have no idea what's going wrong.
rando
03-14-2006, 08:33 AM
Okay, I just had ben assign me your ticket and I'm looking into it.
timberford
03-14-2006, 08:34 AM
thanks very much, i really appreciate it.
rando
03-14-2006, 08:51 AM
Looks like a programming error of some sort. I responded to your ticket.
timberford
03-14-2006, 09:10 AM
ok it's missing the login_generator gem from what i can work out. i tried running...
gem install login_generator
but permission denied, which is no surprise. but if you could install it on that box i reckon it might solve my problems.
thanks for checking this out for me.
rando
03-14-2006, 09:23 AM
Alright, doing it. I'll document a way soon for you to install your own gems that work under ruby on rails, I just haven't gotten it all typed out yet.
timberford
03-14-2006, 10:31 AM
any luck with that rando?
rando
03-14-2006, 12:21 PM
Oh, yeah. Sorry, I had that installed like 3 minutes after I posted saying I'd do it.
timberford
03-14-2006, 02:05 PM
hmm it's still giving me the application error. is it still erroring on the login_generator?
rando
03-14-2006, 02:11 PM
It says login_system, not login_generator, but yes.
timberford
03-14-2006, 02:23 PM
this is really frustrating. i really can't see why it's not working when it's fine for me locally.
this is where i got the information from on the login_system it is called that but it uses login_generator which is the gem you've installed...
http://wiki.rubyonrails.com/rails/pages/HowToQuicklyDoAuthenticationWithLoginGenerator
rando
03-14-2006, 02:30 PM
Hm. You should try posting this to a ruby on rails support forum, this is an application-specific bug and I'm not technically supposed to even be helping you past the server-side requirements (i'll still try but thats just the kind of guy i am :cool: )
I'm about to go home for the day, but I will keep an eye on this and see if i can find an answer otherwise if i have the time.
timberford
03-14-2006, 04:30 PM
I really appreciate your help rando and I fully understand it's application stuff that's not your job to help out with.
anyway i've got my site loading up at last! that error was telling me that i was missing a file in the lib folder called login_system.rb. i must have not copied it across after i created the fresh app on the server. i'm oh so close now! :-)
however, when i go to login i get the error below...
NameError (uninitialized constant User):
/usr/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/active_support/dependencies.rb:195:in `const_missing'
/app/controllers/admin/account_controller.rb:14:in `login'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:853:in `perform_action_without_filters'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/filters.rb:332:in `perform_action_without_benchmark'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/rescue.rb:82:in `perform_action'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/base.rb:369:in `process_without_session_management_support'
/usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/session_management.rb:116:in `process'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/dispatcher.rb:38:in `dispatch'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:141:in `process_request'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:53:in `process!'
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:600:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/fcgi-0.8.6.1/./fcgi.rb:597:in `each_cgi'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:52:in `process!'
/usr/lib/ruby/gems/1.8/gems/rails-1.0.0/lib/fcgi_handler.rb:22:in `process!'
dispatch.fcgi:24
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.