Entries tagged with “production”.


Problem
You have installed Spree in a production server but haven’t populated the database with the default seed data, and you want to add the countries (or any other seed data) that come as default in spree in the vendor/spree/db/default_countries.yml file.

Solution
On your production server, after logging in with ssh and going to the application directory run the following rake task:

rake db:load_file[vendor/spree/db/default/countries.yml] RAILS_ENV=production

Problem
Following from a previous post about email scheduling with runner and cron, it turns out that the runner default behaviour is to run in the development environment.

Solution
Although by reading the help for the script/runner, there is a suggestion to run it with the -e production added to the end, it doesn’t seem to be working.

The solution to make it running in the production environment was to delete the first line (shebang) from step 3 on this post

#!/usr/bin/env /path_to_your_app/script/runner

and then use the following in the cron setup:

RAILS_ENV=production /path/to/your_ror_project/script/runner /path/to/your_ror_project/lib/email_scheduler.rb

Have a look on paragraph Alternative Usage here

Problem
When using cap deploy_with_migrations, the default behaviour is to deploy with the migrations in the production environment.

Solution
To change this behavior add:

set  :rails_env,  "development"

in your config/deploy.rb