Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6254441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:10:48+00:00 2026-05-24T14:10:48+00:00

Everything worked fine on my development machine (windows xp, ROR 3.0.3, SQLite3). When I

  • 0

Everything worked fine on my development machine (windows xp, ROR 3.0.3, SQLite3).

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.

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).

The problem occurs only on the production server, no problem on the developement server. What could it be?

Thanks!

[edit] added 09.08.2011:

routes.rb:

  #USERS
  get "/user/stat"
  devise_for :users do
    get "/login" => "devise/sessions#new"
    get "/logout" => "devise/sessions#destroy"
  end
  get "/users" => "user#index"
  resources :user

registations_controller.rb:

  # 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

log/production.log:

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 #<Class:0x284ac6a8>):
  app/controllers/registrations_controller.rb:71:in `build_resource'
  app/controllers/registrations_controller.rb:8:in `new'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T14:10:48+00:00Added an answer on May 24, 2026 at 2:10 pm

    Change the owner of the app directory to the same user as HTTPD process owner:

    $ chown -R <username> <your_app_dir>
    

    e.g.

    $ chown -R www /usr/local/www/apache22/data
    

    and update Devise:

    $ bundle update
    

    Gemfile specifies the latest Devise version:

    gem 'devise'
    

    That worked for me.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had my development machine set up just fine and everything worked perfectly. But
* edit * After reinstalling the module, everything worked fine. I have installed a
I have a UITableViewController that is fed by a NSFetchedResultsController . Everything worked fine,
I wrote a google map lookup page. Everthing worked fine until I referenced the
Everything works fine when the unit tests class is part of the main project
Everything inherits from object. It's the basis of inheritance. Everything can be implicitly cast
Everything I have read says that when making a managed stored procedure, to right
Everything I read about better PHP coding practices keeps saying don't use require_once because
Everything I can find in linq for aggregation has a group by clause. How
Everything is an object was one of the first things I learned about Ruby,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.