Adam,

that does not look like a passenger / configuration problem to me.  AFAIK,
if you get to the login screen rails has started, including connecting to
the DB, and without passenger you wouldn't get the login screen.
Rather I believe the BCrypt::Errors::InvalidHash (invalid hash): is caused
by a missing / corrupted password fields in your database.
Assuming you ran rake db:migrate RAILS_ENV=production before starting
Tracks I would delete the user in question in the database and try to
register as a new one.

Best
 Christian




On Thu, Mar 8, 2012 at 3:22 PM, Adam Carter <[email protected]>wrote:

> Hi All,
>
> I am having a problem installing Tracks on Debian with Apache.  I can get
> the login screen for Tracks, but when entering the login details it returns
> a 500 error.
> I tried deliberately entering the wrong username for the MySQL config in
> database.yml and the error is the same, so I don't think it is even
> connecting to MySQL yet.
>
> Here is my apache2.conf file (I have tried many versions based on reading
> similar problems):
>
>  LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/**
> passenger-3.0.11/ext/apache2/**mod_passenger.so
>   PassengerRoot /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11
>   PassengerRuby /usr/bin/ruby1.8
>  PassengerUserSwitching off
>  PassengerDefaultUser www-data
>  RailsEnv production
>
> my vhost config:
>
> <VirtualHost *:80>
>    ServerAdmin [email protected]
>    DocumentRoot 
> "/var/www/domain.com/tracks/**public<http://domain.com/tracks/public>
> "
>    ServerName tracks.domain.com
>    ErrorLog  ${APACHE_LOG_DIR}/tracks.**domain.com-error_log.log
>    CustomLog  ${APACHE_LOG_DIR}/tracks.**domain.com-access_log.log
> combined
>
>    AddHandler fcgid-script .fcgi
>    DefaultInitEnv RAILS_ENV production
>
> <Files *.fcgi>
>            SetHandler fcgid-script
>            Options ExecCGI +FollowSymLinks
> </Files>
>
> <Directory 
> /var/www/domain.com/tracks/**public<http://domain.com/tracks/public>
> >
>            RewriteEngine on
>            RewriteCond %{REQUEST_FILENAME} !-f
>            RewriteRule ^/(.*) dispatch.fcgi [QSA,L]
>
>        Allow from all
>        Options -MultiViews
> </Directory>
> </VirtualHost>
>
>
> Production log file:
>
>
> Processing LoginController#login (for 10.0.50.x at 2012-03-08 21:11:24)
> [GET]
>  Parameters: {"action"=>"login", "controller"=>"login"}
> Rendering template within layouts/login
> Rendering login/login
> Completed in 126ms (View: 82, DB: 51) | 200 OK [http://tracks.domain.com/*
> *login <http://tracks.domain.com/login>]
>
>
> Processing LoginController#login (for 10.0.50.x at 2012-03-08 21:11:29)
> [POST]
>  Parameters: {"user_login"=>"user", "action"=>"login",
> "authenticity_token"=>"**xxxxxxxxxxxxxxxxx", "controller"=>"login",
> "user_password"=>"[FILTERED]", "user_noexpiry"=>"on", "login"=>"Sign in »"}
>
> BCrypt::Errors::InvalidHash (invalid hash):
>  vendor/cache/ruby/1.8/gems/**bcrypt-ruby-2.1.4/lib/bcrypt.**rb:165:in
> `initialize'
>  app/models/user.rb:224:in `new'
>  app/models/user.rb:224:in `password_matches?'
>  app/models/user.rb:128:in `authenticate'
>  app/controllers/login_**controller.rb:40:in `login'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/base.rb:1333:in
> `send'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/base.rb:1333:in
> `perform_action_without_**filters'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/filters.rb:617:in
> `call_filters'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/filters.rb:610:in
> `perform_action_without_**benchmark'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/benchmarking.rb:68:**in `perform_action_without_**rescue'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/benchmarking.rb:68:**in `perform_action_without_**rescue'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/rescue.rb:160:in
> `perform_action_without_flash'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/flash.rb:151:in
> `perform_action'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/base.rb:532:in
> `send'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/base.rb:532:in
> `process_without_filters'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/filters.rb:606:in
> `process'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/base.rb:391:in
> `process'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/base.rb:386:in
> `call'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/routing/route_set.**rb:438:in `call'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/dispatcher.rb:87:in
> `dispatch'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/dispatcher.rb:121:**in `_call'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/dispatcher.rb:130:**in `build_middleware_stack'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/string_coercion.rb:**25:in `call'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/string_coercion.rb:**25:in `call'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/params_parser.rb:**15:in `call'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/session/abstract_**store.rb:177:in `call'
>  vendor/cache/ruby/1.8/gems/**activerecord-2.3.14/lib/**
> active_record/query_cache.rb:**29:in `call'
>  vendor/cache/ruby/1.8/gems/**activerecord-2.3.14/lib/**
> active_record/connection_**adapters/abstract/query_cache.**rb:34:in
> `cache'
>  vendor/cache/ruby/1.8/gems/**activerecord-2.3.14/lib/**
> active_record/query_cache.rb:**9:in `cache'
>  vendor/cache/ruby/1.8/gems/**activerecord-2.3.14/lib/**
> active_record/query_cache.rb:**28:in `call'
>  vendor/cache/ruby/1.8/gems/**activerecord-2.3.14/lib/**
> active_record/connection_**adapters/abstract/connection_**pool.rb:361:in
> `call'
>  
> vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**controller/failsafe.rb:26:in
> `call'
>  vendor/cache/ruby/1.8/gems/**actionpack-2.3.14/lib/action_**
> controller/dispatcher.rb:106:**in `call'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/rack/request_**handler.rb:96:in `process_request'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_request_**handler.rb:513:in `accept_and_process_next_**
> request'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_request_**handler.rb:274:in `main_loop'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/classic_rails/**application_spawner.rb:321:in
> `start_request_handler'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/classic_rails/**application_spawner.rb:275:in `send'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/classic_rails/**application_spawner.rb:275:in
> `handle_spawn_application'
>  
> /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**passenger/utils.rb:479:in
> `safe_fork'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/classic_rails/**application_spawner.rb:270:in
> `handle_spawn_application'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server.rb:**357:in `__send__'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server.rb:**357:in `server_main_loop'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server.rb:**206:in `start_synchronously'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server.rb:**180:in `start'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/classic_rails/**application_spawner.rb:149:in `start'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/spawn_manager.rb:**219:in `spawn_rails_application'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server_**collection.rb:132:in `lookup_or_add'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/spawn_manager.rb:**214:in `spawn_rails_application'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server_**collection.rb:82:in `synchronize'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server_**collection.rb:79:in `synchronize'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/spawn_manager.rb:**213:in `spawn_rails_application'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/spawn_manager.rb:**132:in `spawn_application'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/spawn_manager.rb:**275:in `handle_spawn_application'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server.rb:**357:in `__send__'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server.rb:**357:in `server_main_loop'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/lib/phusion_**
> passenger/abstract_server.rb:**206:in `start_synchronously'
>  /usr/lib/ruby/gems/1.8/gems/**passenger-3.0.11/helper-**
> scripts/passenger-spawn-**server:99
>
> Rendering 
> /var/www/domain.com/tracks/**public/500.html<http://domain.com/tracks/public/500.html>(500
>  Internal Server Error)
>
>
> It looks like it might be an issue with the passenger-spawn-server.
>
> This is the first time I have installed a Ruby on Rails application, so
> there is a very high chance there is something wrong with my install, but I
> would appreciate a kind pointer in the right direction please!
>
> Thanks
> ______________________________**_________________
> Tracks-discuss mailing list
> [email protected].**org.uk<[email protected]>
> http://lists.rousette.org.uk/**mailman/listinfo/tracks-**discuss<http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss>
>
_______________________________________________
Tracks-discuss mailing list
[email protected]
http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss

Reply via email to