Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JoseJRVazquez/9959277 to your computer and use it in GitHub Desktop.
Save JoseJRVazquez/9959277 to your computer and use it in GitHub Desktop.
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!
@JoseJRVazquez
Copy link
Author

 $ bundle install --without production

@JoseJRVazquez
Copy link
Author

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