Note that there are some explanatory texts on larger screens.

plurals
  1. PODevise - NoMethodError in Registrations#new controller
    primarykey
    data
    text
    <p>Everything worked fine on my development machine (windows xp, ROR 3.0.3, SQLite3). </p> <p>When I moved the application to the production server (FreeBSD 8.2-RELEASE, Apache 2.2, ROR 3.0.4, MySQL), this error appeared, but only on new registration page. </p> <p>When I try to login (there are no users in the database), password check seems to work (it says that password incorrect, which is fine).</p> <p>The problem occurs only on the production server, no problem on the developement server. What could it be?</p> <p>Thanks!</p> <p>[edit] added 09.08.2011:</p> <p>routes.rb:</p> <pre><code> #USERS get "/user/stat" devise_for :users do get "/login" =&gt; "devise/sessions#new" get "/logout" =&gt; "devise/sessions#destroy" end get "/users" =&gt; "user#index" resources :user </code></pre> <p>registations_controller.rb:</p> <pre><code> # GET /resource/sign_up def new build_resource({}) render_with_scope :new end protected # Build a devise resource passing in the session. Useful to move # temporary session data to the newly created user. def build_resource(hash=nil) hash ||= params[resource_name] || {} self.resource = resource_class.new_with_session(hash, session) end </code></pre> <p>log/production.log:</p> <pre><code>Started GET "/users/sign_up" for 192.168.5.7 at 2011-08-09 13:40:31 +0400 Processing by Devise::RegistrationsController#new as HTML SQL (31.7ms) SHOW TABLES Completed in 33ms NoMethodError (undefined method `new_with_session' for #&lt;Class:0x284ac6a8&gt;): app/controllers/registrations_controller.rb:71:in `build_resource' app/controllers/registrations_controller.rb:8:in `new' </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload