spree with Heroku and Amazon S3

A) spree installation 

1) add in gem file and bundle install
gem ‘spree’
gem ‘spree_auth_devise’
gem ‘spree_gateway’, :git => ‘git://github.com/spree/spree_gateway.git’, :branch => “1-3-stable”

2) rails g spree:install
3) bundle exec rake spree_auth:install:migrations
4) bundle exec rake db:migrate
5)change the following line in config/initializers/spree.rb
Spree.user_class = “Spree::LegacyUser”  to    Spree.user_class = “Spree::User”
6) bundle exec rake spree_auth:admin:create
7) to change logo rename your logo to “spree_50.png” and place at
/app/assets/images/admin/bg/spree_50.png
8) added extensions the extension spree_self_delivery

B) Deployment on Heroku and Amazon S3

1) underneath the other config.assets lines inside config/application.rb add
config.assets.initialize_on_precompile = false

2) To configure Spree to upload images to S3, put these lines into config/initializers/spree.rb:

Spree.config do |config|
config.use_s3 = true
config.s3_bucket = ‘<bucket>’
config.s3_access_key = “<key>”
config.s3_secret = “<secret>”
end

3) in config/initializers/spree.rb:

Paperclip.interpolates(:s3_eu_url) do |attachment, style|
“#{attachment.s3_protocol}://#{Spree::Config[:s3_host_alias]}/#{attachment.bucket_name}/#{attachment.path(style).gsub(%r{^/}, “”)}”
end

4) git push heroku master
5) heroku run rake db:migrate
6) heroku run rake spree_auth:admin:create
7) heroku run rake db:seed
8) add addon sendGrid in heroku
Refer http://guides.spreecommerce.com/deploying_on_heroku.html

problem 1 :- Countries and States list not available in Spree

solution:- rake db:seed

www.klairvoyant.in
http://orchids.klairvoyant.com

Advertisements
This entry was posted in rails, ROR, ruby on rails, web development and tagged , , , , , , , , , . Bookmark the permalink.

One Response to spree with Heroku and Amazon S3

  1. jigar says:

    thank You

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s