Created
April 3, 2014 17:50
-
-
Save JoseJRVazquez/9959277 to your computer and use it in GitHub Desktop.
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
I decided to try my luick and see how much I remebered from my first depoyment to heroku: luckily I had already installed heroku to the system in 2013, and had an account with a functioning app: | |
http://shielded-river-4844.herokuapp.com | |
Deploying to heroku requires we change the gem file: Gems are as follows: | |
Gems can be used to extend or modify functionality within a Ruby application. Commonly, they're used to split out reusable functionality that others can use in their applications as well. Some gems also provide command line utilities to help automate tasks and speed up your work. | |
So for the first-app in rails, we have to add postgres functionality | |
so we replaced the ```gem 'sqlite3'``` lines with the following lines of code | |
``` | |
# Gemfile | |
group :production do | |
gem 'pg' | |
gem 'rails_12factor' | |
end | |
group :development do | |
gem 'sqlite3' | |
end | |
``` | |
Heroku ca only use postgres, so this will ensure that it stays in sql while we code, and move to ```postgres``` when deployed | |
No at the bottom of the config/application.rb file I had to add two lines rather than just one, which were as follows: | |
```rails | |
config.assets.version = '1.0' | |
config.assets.initialize_on_precompile = false | |
``` | |
```bash | |
$ bundle install --without production | |
``` | |
the above code allowed me to install the needed gems without affecting the production version | |
once in the first-app directory I created a nameless app by entering ```heroku create``` into the terminal and pushing to heroku the master via git using the following code: ```git push heroku master``` | |
I didnt have to trouble shoot at all. next checkpoint! | |
Author
JoseJRVazquez
commented
Apr 3, 2014
i just realized markdown doesnt work within the gist: silly me
config.assets.version = '1.0'
config.assets.initialize_on_precompile = false
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment