first rails deploy to heroku

this’s first time I deploy to heroku,. with one page without database

 rails g controller Store index

and delete public/index.html.
root :to => ‘store#index’

I am put in my Gemfile

group :development, :test do
  gem 'sqlite3'
end
group :production do
  gem 'pg'
end

and then

 bundle install --without production

Store my Application in git as usual

   $ git init
   $ git add .
   $ git commit -m "init"

deploy my Application in Heroku

   $ heroku login
   $ heroku create
   $ git push heroku master

visit my Application

$ heroku ps:scale web=1
$ heroku ps
$ heroku open

and then, open my App
my first trial

and second time, with several pages and adding the stylesheets (css)
also ‘heroku logs’ is useful for tracing error

In config/application.rb, add

config.assets.initialize_on_precompile = false

second trial

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s