First add the following gems to your Gemfile
:
# Gemfile
gem "attachinary"
gem "jquery-fileupload-rails"
gem "coffee-rails"
sudo apt remove apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php libapache2-mod-php7.0 php7.0-mysql php7.0-opcache php7.0-readline mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 php-mysql php7.0-mysql php-common php-mysql php7.0-cli php7.0-common php7.0-json |
URL | HTTP Verb | Action |
---|---|---|
/photos/ | GET | index |
/photos/new | GET | new |
/photos | POST | create |
/photos/:id | GET | show |
/photos/:id/edit | GET | edit |
/photos/:id | PATCH/PUT | update |
/photos/:id | DELETE | destroy |
Commands to keep your app healthy, Ruby and Rails gems wise.
Each command is described further below.
Open new Terminal, note the gemsets showing:
rvm gemset list
You will see you are using the (default) gemset.
Keep your system up to date with rvm
and brew
:
rvm get stable
# db/migrates/*_add_locale_to_users.rb | |
class AddLocaleToUsers < ActiveRecord::Migration | |
def change | |
add_column :users, :locale, :string, default: "fr" | |
end | |
end |
This guide is for a first-time Rails developer to deploy their app to Heroku, a popular web-hosting service with strong Rails support. This guide assumes you already have a Heroku account and have installed the Heroku Toolbelt.