Open nanounanue opened 10 years ago
I am using a very simple rails app as example, in this github repo you could see the code https://github.com/nanounanue/blog
the app runs perfectly in my machine with rails s -e production
The error looks like it's trying to compile assets locally but to do that you need to define a production entry in your local database.yml. This can be the same as development as it won't be used for anything. Alternatively you can disable the compile assets locally task and uncomment the rails/assets line in your Capfile which will compile them remotely when you deploy.
The solution as you said is setting a production environment in database.yml
, but it seems weird to me...
Hey, which bit seems weird?
Ben Dixon
+44 (0)2 032 894 803 +33 (0)7 81 83 27 78 http://www.twitter.com/TalkingQuickly http://www.talkingquickly.co.uk
Dxnx Ltd Trading as Hills Bede UK Registered Company Number: 6751002
Registered Address: DXNX LTD Techhub @ Google Campus 4 - 5 Bonhill Street London EC2A 4BX
On 25 June 2014 21:48, Adolfo De Unánue notifications@github.com wrote:
The solution as you said is setting a production environment in database.yml, but it seems weird to me...
— Reply to this email directly or view it on GitHub https://github.com/TalkingQuickly/capistrano-3-rails-template/issues/12#issuecomment-47156538 .
If none of above worked for you, try to create, on your localhost, production/staging database (depending to what environment you're trying to deploy)
When running
cap production deploy
it returns two erros as show below:One is
SSHKit::Command::Failed: RAILS_ENV=production bundle exec rake assets:precompile exit status: 256
and another (which seems unrelated)ActiveRecord::AdapterNotSpecified: database configuration does not specify adapter
Any ideas?