Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- So today, I'll be showing you how to deploy Spree on Heroku.
- Let's visit this how-to guide by Jeriel.
- http://vertsol.pbworks.com/w/page/32745472/Setting%20up%20Spree
- First things first, you must have the following:
- rails 3.0.10
- ruby 1.9.1
- rubygems 1.3.7
- Also you should have generated and configured your ssh keys.
- So let's start.
- Let's install spree.
- (sudo) gem install spree -v0.11.0
- Be patient when installing spree.
- Next, let's install hoe 2.8.0 (this is an important gem to successfully run and deploy spree on heroku)
- (sudo) gem install hoe -v2.8.0
- Now we're ready to create our rails app.
- spree <-your-app-name->
- cd <-your-app-name->
- script/extension install git://github.com/RSpace/spree-heroku.git
- cp vendor/extensions/heroku/.gems ./
- Let's edit our gems file.
- Reminder: this step is VERY important. please copy the order of gems in this gem file.
- You can edit .gems with any text editor (e.g. Notepad, gedit)
- This is my gems file, you can pause this video and copy it as it is.
- rails -v '2.3.8'
- hoe -v '2.8.0'
- highline -v '1.5.1'
- authlogic -v '>=2.1.2'
- authlogic-oid -v '1.0.4'
- activemerchant -v '1.5.1'
- activerecord-tableless -v '0.1.0'
- less -v '1.2.20'
- stringex -v '1.0.3'
- chronic -v '0.2.3'
- whenever -v '0.3.7'
- searchlogic -v '2.3.5'
- will_paginate -v '2.3.11'
- faker -v '0.3.1'
- paperclip -v '>=2.3.1.1'
- state_machine -v '0.8.0'
- aws-s3 -v '0.6.2'
- spree -v '0.11.0'
- When you run rake gems:install, your terminal will install the gem aws-s3, since I've already installed it, nothing happened.
- rake gems:install
- rake db:bootstrap
- Loading the sample data will take some time, so I'll choose 'no' for now.
- If you haven't verified heroku and/or created an Amazon S3 account, let's do it first.
- You can verify your account by clicking the 'Update billing info' link.
- Create your Amazon S3 account. And create a bucket.
- We will be using that bucket later, as well as the access keys.
- You can get your access keys in the security credentials page.
- now back to our app.
- let's test our spree on our local machine
- good.
- moving on.
- git init on your app folder
- then create your heroku app.
- heroku create <-app-name-> --stack bamboo-ree-1.8.7
- include this addon in your app: "Piggyback SSL"
- (Again, you can only do this if you have a verified Heroku account.)
- heroku addons:add "Piggyback SSL"
- git add .
- git commit -m "message"
- heroku db:push
- pushing your database might take a while.
- if you haven't verified your heroku account and/or created an amazon s3 account, you can do it now.
- let's now push it to heroku (rails app)
- be patient.
- You can only have a successful push to heroku if you have the proper order of gems to be installed with your app.
- Success!
- We've pushed our rails app into heroku.
- But before everything else, we should configure our s3 keys.
- you can do it by entering the following commands below:
- For this step, I'll be doing it on my own.
- heroku config:add S3_KEY=[your S3 access key]
- heroku config:add S3_SECRET=[your S3 secret]
- heroku config:add S3_BUCKET=[your S3 bucket]
- and we're done!!!
- SUCCESS!!!
- THANK YOU FOR WATCHING! :)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement