DB tables inexistant online but there in console


#1

Hi,

I’m quite close achiving my first Cap Deploy … but something strange
is
happening:

set :deploy_to, “/var/www/#{application}”

set :user, ‘root’

set :deploy_via, :export

namespace :deploy do
desc “Restart the server”
task :restart do
run “cd #{release_path} && RAILS_ENV=production mongrel_rails stop
-P log/mongrel_9191.pid”
run “cd #{release_path} && RAILS_ENV=production mongrel_rails start
-d -p 9191 -P log/mongrel_9191.pid”
end
end

role :app, “ksXXXXX.kimsufi.com
role :web, “ksXXXXX.kimsufi.com
role :db, “ksXXXXX.kimsufi.com”, :primary => true

  • I had to do first: rake RAILS_ENV=production db:schema:load and import
    my db.dump in production.sqlite3

  • I tried in the console ‘app.get("/")’ gives me 200.

  • BUT!!! When I access from the browser, it gives me a 500 error and on
    the production.log it says that one table doesn’t exist. When I access a
    page that doesn’t need db access (for example login), it works fine …

What am I missing???

Thank you for your help,

Thithi32