mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-11 09:54:21 +01:00
Updating process
parent
2103dbb76b
commit
2e1796093b
1 changed files with 14 additions and 67 deletions
|
|
@ -1,71 +1,18 @@
|
|||
h1. Heroku
|
||||
|
||||
With the most recent version of tracks as of this writing (March 18, 2011), here are the steps I took to get tracks working on Heroku (steps for a non-programmer...):
|
||||
Installing Tracks 2.0 or newer on Heroku is fairly simple, here are the steps to get tracks working on Heroku (steps for a non-programmer...):
|
||||
|
||||
1. Unpack the application (I used "git clone," but unzipping will do just fine).
|
||||
|
||||
3. Setup the database as preferred (I used PostgreSQL, as this is what Heroku prefers, and for which there is a backup add-on).
|
||||
|
||||
2. Navigate to config/environments/production.rb. Change the cache settings to "false" ("config.cache_classes" remains "true", whereas "config.action_controller.perform-caching" is set to "false").
|
||||
|
||||
3. Start the production server locally: "script/server -e production" (this creates some files that Heroku will need to be already setup before the application migrates to Heroku). Login, poke around, then shut down the server.
|
||||
|
||||
4. Add a .gems manifest file in the application root directory. Mine just has three lines:
|
||||
|
||||
rails --version 2.3.8
|
||||
RedCloth
|
||||
sanitize
|
||||
|
||||
(I can't seem to get the right code formatting here, but the rails line has two dashes before the word "version".)
|
||||
|
||||
5. (Extra step, not actually required): remove the git submodule directory for the tracks manual. There's a howto for removing submodules (http://devcenter.heroku.com/articles/git-submodules) in the Heroku docs, so I won't reproduce it here. Pasting of code involved.
|
||||
|
||||
6. Comment out some of the items in the .gitignore file. I put a hash-- # -- at the beginning of each of these lines:
|
||||
|
||||
#config/database.yml
|
||||
# Unpack the application (I used "git clone," but unzipping will do just fine).
|
||||
# Configure your Tracks instance
|
||||
## Navigate to @config/environments/production.rb@ and change the cache settings to "false" ("config.cache_classes" remains "true", whereas "config.action_controller.perform-caching" is set to "false")
|
||||
## Copy @config/site.yml.tmpl@ to @config/site.yml@ and change its contents (documented by the comments)
|
||||
## Change the @Gemfile@ and replace the line @gem "sqlite3"@ with @gem "pg"@ and run @bundle install@
|
||||
# Comment out some of the items in the .gitignore file. I put a hash-- # -- at the beginning of each of these lines:
|
||||
<code>
|
||||
#config/site.yml
|
||||
#config/deploy.rb
|
||||
#db/data.yml
|
||||
#db/schema.rb
|
||||
|
||||
I am thinking about also commenting out the lines for jquery and javascript, as these are the items that I received errors for before I changed the caching settings (step 2 above). This may be another way to get the same result.
|
||||
|
||||
7. Commit everything.
|
||||
|
||||
I can't remember the exact order of these next steps, but I did them all:
|
||||
|
||||
8. Create the app on the bamboo stack:
|
||||
|
||||
heroku create --stack bamboo-ree-1.8.7
|
||||
|
||||
9. Push the commit (git push heroku master).
|
||||
|
||||
10. Push the database (heroku db:push)
|
||||
|
||||
11. Open the application (heroku open)
|
||||
|
||||
I may have mixed up the order a bit, and some of the details, but the above is the gist of what I did. I wanted to post it here because in order to succeed I had to gather information from all over the place. Also, I am no expert, so some of what I did here may not be best practice -- but it does work.
|
||||
|
||||
|
||||
Comment:
|
||||
|
||||
2011.03.21 // textual
|
||||
Worked for me!
|
||||
I ended up having to find instances of rake 1.0.1 and change to 1.2.2 in gemspec
|
||||
Also had to change both instances of cache to false
|
||||
thanks for the write up
|
||||
|
||||
Update:
|
||||
|
||||
With the slightly newer version of tracks from May 2011, and the slightly altered practices on Heroku, I now have a Gemfile instead of a .gems file. The Gemfile has the following:
|
||||
|
||||
source :gemcutter
|
||||
gem "RedCloth"
|
||||
gem "sanitize"
|
||||
gem "rack", "~>1.1.0"
|
||||
gem "will_paginate"
|
||||
gem "has_many_polymorphs
|
||||
|
||||
I also have a Gemfile.lock file. Both of these new files have been added to the git repo (git add Gemfile, git add Gemfile.lock). There is an article over on Heroku about Gemfile and Gemfile.lock. The process is very straightforward.
|
||||
|
||||
I have also changed both instances of the cache to false.
|
||||
</code>
|
||||
# Add the created site.yml with @git add config/site.yml@ and commit everything with @git -a@
|
||||
# Create a Heroku app on the Bamboo stack with @heroku create {NAME} --stack bamboo-ree-1.8.7@
|
||||
# Push the commit with @git push heroku master@
|
||||
# Run the migrations on Heroku with @heroku run rake db:migrate@
|
||||
# Open the application with @heroku open@
|
||||
Loading…
Add table
Add a link
Reference in a new issue