Last active
August 29, 2015 14:27
-
-
Save JoshvaR88/791971254d8cc7752d85 to your computer and use it in GitHub Desktop.
Setting up a new Spree app with Postgres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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