Hi everyone, yesterday I switched the environment on my production server from dev to prod via changing the vhost file for the Apache. I changed RailsEnv development to RailsEnv production and deployed the application via capistrano. But now I get a passenger error see at http://test.kwikit.de What ist the problem? Do I need to do a cold deploy with capistrano or what ist the solution? Please help Cheers Adam -- Posted via http://www.ruby-forum.com/.
2009/9/23 Adam Meyer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Hi everyone, > > yesterday I switched the environment on my production server from dev to > prod via changing the vhost file for the Apache. > > I changed > > RailsEnv development > > to > > RailsEnv production > > and deployed the application via capistrano. > > But now I get a passenger error see at http://test.kwikit.de > > What ist the problem? Do I need to do a cold deploy with capistrano or > what ist the solution? >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? > > ColinHey 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. -- Posted via http://www.ruby-forum.com/.
2009/9/23 Adam Meyer <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > 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> > 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. > -- > Posted via http://www.ruby-forum.com/. > > > >
Adam.> *** [err :: kwikit.de] no such file to load -- applicationSeems like an issue with rails n passenger version. Can you simlink the application.rb to application_controller.rb and it should work fine. cd RAILS_ROOT/app/controller ln -s application_controller.rb application.rb Thanks, Kilari. -- Posted via http://www.ruby-forum.com/.
2009/9/23 Vamsi krishna Kilari <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Adam. > >> *** [err :: kwikit.de] no such file to load -- application > Seems like an issue with rails n passenger version. Can you simlink the > application.rb to application_controller.rb and it should work fine. > > cd RAILS_ROOT/app/controller > > ln -s application_controller.rb application.rb >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. -- Posted via http://www.ruby-forum.com/.
Colin Law wrote:> 2009/9/23 Vamsi krishna Kilari <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: >> > Would you expect it to work on the server in dev mode but not in > production if that were the problem? > > Colinoops I thought he meant to say dev server. -- Posted via http://www.ruby-forum.com/.
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! -- Posted via http://www.ruby-forum.com/.
Adam Meyer wrote:> Okay, I got it, but please do not ask how.I''ll bite. How?> There was a problem with the migration to production.sqlite3 but I fixed > it!And the problem was...? And you fixed it by...?> > Thanks dude!Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/.
Marnen Laibow-Koser wrote:> Adam Meyer wrote: >> Okay, I got it, but please do not ask how. > > I''ll bite. How? > >> There was a problem with the migration to production.sqlite3 but I fixed >> it! > > And the problem was...? And you fixed it by...? > >> >> Thanks dude! > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.orgBecause the I changed some settings for storing the db because of having it accross all deployments. I put it into shared and symlinked it. There was a mistake in it. -- Posted via http://www.ruby-forum.com/.