Skip to content

Instantly share code, notes, and snippets.

@holodnak
Created August 7, 2013 20:10
Show Gist options
  • Save holodnak/6178096 to your computer and use it in GitHub Desktop.
Save holodnak/6178096 to your computer and use it in GitHub Desktop.
create new rails app:
$ rails new store_name -d postgresql
in postgres:
$ psql -U postgres
$ create role store_name login createdb;
create databases:
$ cd store_name
$ rake db:create
add spree to gemfile:
gem 'spree', '1.1.3'
then:
$ bundle
$ spree install
$ Would you like to precompile assets? (yes/no) no #otherwise looks for production db during install
in application.rb:
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
.
.
.
# for Heroku, prevent initializing your application and
# connecting to the database
config.assets.initialize_on_precompile = false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment