views:

164

answers:

4

I have tried to make it work around 6 times using different tutorials, and I arrive to the same result. I install the plugin correctly, generate the files correctly, add the routes correctly, migrate my database correctly, and yet when I go to myurl.com/signup or myurl.com/login, the "something went wrong" rails page appears (like a 404 error).

I am on rails 2.3.3. Does this plugin have problems with 2.3.3? Because it does not work neither on local nor on server development. Any ideas on what might be wrong?

Here is my routes file:

# routes.rb
ActionController::Routing::Routes.draw do |map|
  map.resources :users
  map.resource  :sessions
  map.signup '/signup', :controller => 'users', :action => 'new'
  map.login  '/login', :controller => 'sessions', :action => 'new'
  map.logout '/logout', :controller => 'sessions', :action => 'destroy'
end

Thanks!

A: 

Well this plugin is being used in production by a number of sites, so I hate to burst your bubble but something somewhere has been done incorrectly.

What server are you using?

If you think it's a problem with 2.3.3, which I doubt, try it with 2.3.2, or 2.2.2, versions where it definately works.

What does your controllers look like? What does your model look like??

Which Tutorial did you follow?

You are lacking a lot of information that could help people asssit you.

railsninja
I followed the railscast video tutorial (ep. 67), a tutorial on NetTuts+, and this one http://avnetlabs.com/rails/restful-authentication-with-rails-2. For the latter, I even copied/pasted all the code as-is. My models and controllers have not been modified, they are the default ones generated by the plugin, and I have not generated anything else.
Joel M.
Again we are asked to take your word for it, but this won't help anyone help you. Post some code, some server configs, what server you are using, by showing what you have people can help. Until then they cannot. It really is that simple. It reminds when I hear users saying I didn't click that, and I am looking at a log that they have done it, but they swear black and blue ....
railsninja
I am in the process of reloading my whole server, there is a much deeper issue with the rails installation, since other things also stopped working. Thanks for your willingness to help.
Joel M.
A: 

Here is my log file

Processing UsersController#new (for 201.229.164.198 at 2009-08-14 05:52:37) [GET]

CGI::Session::CookieStore::TamperedWithCookie (CGI::Session::CookieStore::TamperedWithCookie): /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session/cookie_store.rb:145:in unmarshal' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session/cookie_store.rb:102:in restore' /usr/lib/ruby/1.8/cgi/session.rb:310:in []' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/cgi_process.rb:98:in session' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/cgi_process.rb:130:in stale_session_check!' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/cgi_process.rb:78:in session' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:1205:in assign_shortcuts_without_flash' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/flash.rb:166:in assign_shortcuts' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:519:in process_without_filters' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/filters.rb:606:in process_without_session_management_support' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/session_management.rb:134:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/base.rb:392:in process' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:183:in handle_request' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:110:in dispatch_unlocked' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:123:in dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in synchronize' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:122:in dispatch' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:132:in dispatch_cgi' /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:39:in dispatch' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/request_handler.rb:49:in process_request' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_request_handler.rb:206:in main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:376:in start_request_handler' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:334:in handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/utils.rb:182:in safe_fork' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:332:in handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in send' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:195:in start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:162:in start' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/railz/application_spawner.rb:213:in start' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:261:in spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb:126:in lookup_or_add' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:255:in spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb:80:in synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server_collection.rb:79:in synchronize' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:254:in spawn_rails_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:153:in spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/spawn_manager.rb:286:in handle_spawn_application' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in __send__' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:351:in main_loop' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/lib/phusion_passenger/abstract_server.rb:195:in `start_synchronously' /usr/lib/ruby/gems/1.8/gems/passenger-2.2.4/bin/passenger-spawn-server:61

Rendering /var/rails/rtm/public/500.html (500 Internal Server Error)

Joel M.
Please use the Markdown formatting. Look here: http://stackoverflow.com/editing-help
Swanand
A: 

i was have problem same like that, when im used rails 2.3.3. when i tried to myapp.com/login page appears (like a 404 error), when rails on production. dont ever edit ur router. and i solve this problem with edited my .httaccess file

RewriteEngine on
RewriteCond %{HTTP_HOST} ^myapp.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.myapp.com$
RewriteRule ^.*$ "http\:\/\/127\.0\.0\.1\:12007%{REQUEST_URI}" [P,QSA,L]

and my app worked well

Kuya
I'm going to try that, thanks.
Joel M.
Nope. Doesn't fix it...
Joel M.
A: 

are you sure you don't have a .htaccess file in your public directory? i'd remove it if you do, cause passenger bungs up alot with those files in there. in my experience anyways. Also did you move that line to application_controller.rb? the line is

include AuthenticatedSystem

As railsninja said, we need more info.

pjammer
Yep, I moved that from the controllers to the application controller, so it inherits. And I dont have an httaccess file. It is not a routes problem, because accessing it directly, via users/new or sessions/new does not work either.
Joel M.