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
Taken from this stackoverflow thread: http://stackoverflow.com/questions/18324063/rails-4-images-not-loading-on-heroku | |
You need to do two things to resolve it. First, change these two lines from false to true in production.rb file. | |
config.assets.compile = true | |
config.assets.digest = true | |
Second, if you've syntax like this for your images | |
background: url("imgo.jpg") |
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
The problem is heroku doesn't have the migrations that you locally have, in order to have the same database version do the following migration on heroku: | |
To know the local db version do: | |
$ rake db:version | |
Then take the version you get locally and make sure you have it in heroku by doing the following: | |
$ heroku run rake --trace db:migrate VERSION=20151127134901 | |
Explanation: Essentially the above command takes the db migration to heroku with the same version of migration you have locally. |
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
#Create the repo on github. Don't add a .gitignore or license and don't initialize it. | |
#Back in your terminal inside your project folder | |
git init | |
git add . | |
git commit -m "Initial commit message" | |
git remote add origin https://github.com/your_organization/my_great_app.git | |
git push -u origin master |
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
$ git remote rm origin | |
$ git remote add origin [email protected]:aplikacjainfo/proj1.git | |
$ git config master.remote origin | |
$ git config master.merge refs/heads/master |
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
## DEPLOY RAILS APP TO HEROKU ## | |
IN HEROKU => | |
# Create a free heroku account if you don't have one already | |
# pick app you want to deploy (it can't be that is on sql, has to be postgresql) OR create a new app | |
** if your app was created in sql, to change to postgres is a bit involved, get help ** | |
# create new app | |
# choose name for app | |
# install toolbelt (only need this once, if it is a new computer install again, there is a link on heroku to download) |
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
# GoDaddy Account > Domain Manager > DNS Management | |
# Domain Settings > Manage DNS > Records => | |
Add > | |
Host: * | |
Points to: appname.herokuapp.com | |
TTL: 1 hour | |
Add > | |
Host: appnamesecure | |
Points to: appname-2121.herokussl.com |
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
In GoDaddy => | |
Go to "Manage my Domains" | |
Next to your domain, click on the Settings Sprocket Drop down and select "Manage DNS" | |
At the bottom of the "Records" Section, click "ADD" | |
Type: A | |
Host: @ | |
Points to: 192.30.252.153 | |
* Leave TTL as is | |
Click "ADD" again to add another record: |
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
#Creating an app called my_great_app | |
rails new my_great_app -T -d postgresql --skip-turbolinks | |
cd my_great_app | |
git init | |
git add . | |
git commit -m "Initial commit. Rails boilerplate." | |
# Edit gemfile | |
# #Remove the reference to coffee-rails. |