Project

General

Profile

Issues with sudo rake db:migrate RAILS_ENV="production"

Added by Addison McDermid about 15 years ago

When I run this command - sudo rake db:migrate RAILS_ENV="production" I receive the following error:

ad@redmine:/home/redmine/config$ sudo rake db:migrate RAILS_ENV="production"
(in /home/redmine)
rake aborted!
A key is required to write a cookie containing the session data. Use config.action_controller.session = { :key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb

(See full trace by running task with --trace)

I am following a guide here on how to install on ubuntu - http://ubuntuforums.org/showthread.php?t=674598

Please advise.


Replies (6)

RE: Issues with sudo rake db:migrate RAILS_ENV="production" - Added by Addison McDermid about 15 years ago

ore explaining your problem, please add the following informations:
- Ruby implementation and version
ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]
- Rails version (rails --version)
Rails 2.3.4
- Operating system (precise if you're using cygwin when running on Windows)
Ubuntu 9.04 Server
- Database used, and its version
Mysql 5.0.75
- Ruby-aware server used: Webrick, Mongrel, Thin, etc. If you don't understand this point, you're using Webrick.
webrick

RE: Issues with sudo rake db:migrate RAILS_ENV="production" - Added by Eric Davis about 15 years ago

Which version of Redmine are you using? If it's trunk, you missed a step 4 in the Install Guide.

Eric Davis

RE: Issues with sudo rake db:migrate RAILS_ENV="production" - Added by Addison McDermid about 15 years ago

I have now completed step 4 as it is the trunk I am installing at this point in time. That has fixed that problem. Thank you.

Could you please advise on a good tutorial on setting up Redmine to run under Apache2 for instructions either specific to Ubuntu if possible otherwise Debian instructions would be great thank you.

RE: Issues with sudo rake db:migrate RAILS_ENV="production" - Added by Dustin Sweigart about 15 years ago

A key is required to write a cookie containing the session data. Use config.action_controller.session = { :key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb

I'm having the same problem when I try and do "RAILS_ENV=production rake db:migrate." According to the installation guide, step 4 only needs to be done if you're on the trunk. I cloned it from github, and I get this error on the master branch and back at tag 0.8.x. I'm not even sure where to go from here because session_store.rb doesn't even seem to exist.

ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
rails (2.3.4)

RE: Issues with sudo rake db:migrate RAILS_ENV="production" - Added by Dustin Sweigart about 15 years ago

Dustin Sweigart wrote:

[...]
I'm having the same problem when I try and do "RAILS_ENV=production rake db:migrate." According to the installation guide, step 4 only needs to be done if you're on the trunk. I cloned it from github, and I get this error on the master branch and back at tags 0.8.x. I'm not even sure where to go from here because session_store.rb doesn't even seem to exist.

ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
rails (2.3.4)

RE: Issues with sudo rake db:migrate RAILS_ENV="production" - Added by Eric Davis almost 15 years ago

Dustin Sweigart wrote:

I'm having the same problem when I try and do "RAILS_ENV=production rake db:migrate." According to the installation guide, step 4 only needs to be done if you're on the trunk. I cloned it from github, and I get this error on the master branch and back at tag 0.8.x.

You need to do Step 4 if you are running 0.8.7 or trunk. The master branch on Github is a clone of trunk.

Eric Davis

    (1-6/6)