Running App in Production Env

What is the name of your application controller?
Are you sure it is running with the same version of rails as in development?
If so how do you know?

Colin

Colin Law wrote:

What is the name of your application controller?
Are you sure it is running with the same version of rails as in
development?
If so how do you know?

Colin

Hey Colin

sorry but I don't understand your questions?

I already deployed the app a couple of times to my server in dev mode.
Now I switched to prod and I run into trouble.

I deleted the capistrano folder structure on my server and made a cold
deploy, now I get the following error while the cap deploy:

executing `deploy:migrate'
  * executing "ls -xt /srv/www/kwikit/releases"
    servers: ["kwikit.de"]
    [kwikit.de] executing command
    command finished
  * executing "cd /srv/www/kwikit/releases/20090923195330; rake
RAILS_ENV=production db:migrate"
    servers: ["kwikit.de"]
    [kwikit.de] executing command
*** [err :: kwikit.de] rake aborted!
*** [err :: kwikit.de]
*** [err :: kwikit.de] no such file to load -- application
*** [err :: kwikit.de]
*** [err :: kwikit.de]
*** [err :: kwikit.de] (See full trace by running task with --trace)
*** [err :: kwikit.de]
** [out :: kwikit.de] (in /srv/www/kwikit/releases/20090923195330)
    command finished
failed: "sh -c \"cd /srv/www/kwikit/releases/20090923195330; rake
RAILS_ENV=production db:migrate\"" on kwikit.de

I have no idea what to do...

I have more than one controller, the server is running in same rails
version as my notebook. It works on deploying with dev anyway.

Colin Law wrote:

What is the name of your application controller?
Are you sure it is running with the same version of rails as in
development?
If so how do you know?

Colin

Hey Colin

sorry but I don't understand your questions?

You should have a controller called application.rb or
application_controller.rb, do you? If so which?

I already deployed the app a couple of times to my server in dev mode.
Now I switched to prod and I run into trouble.

I did not realise that it runs on the server in dev mode but not
production. The only difference in the app is the settings in
database.yml and the differences between production.rb and
development.rb so have a careful look at those. Have you changed
anything there? If you still cannot see it, first check it still runs
on the server in development mode then I suggest changing the contents
of database.yml and production.rb to be the same as for development,
if it then goes ok change them back iteratively till it fails. Keep
notes as you go or you will get lost, or at least I would.

Colin

Would you expect it to work on the server in dev mode but not in
production if that were the problem?

Colin

Colin

Would you expect it to work on the server in dev mode but not in
production if that were the problem?

From rails 2.3.0 application.rb is renamed to application_controller.rb
which you are aware of. And passenger <=2.0.3 looks for application.rb
and higher versions looks for application_controller.rb. Its fine both
ways if u run on mongrel or webrick.So I believe this is the issue Adam
is facing.

Thanks,
Kilari.

Colin Law wrote:

Okay, I got it, but please do not ask how.
There was a problem with the migration to production.sqlite3 but I fixed
it!

Thanks dude!