Puchumaldito was my first Blog using Rails 4.2.1 and Ruby 2.2.1, previously deployed on Heroku.
Ensure you have the following installed:
-
Ruby 2.2.1
ruby -v
-
Rails 4.2.1
rails -v
Install using:
gem install rails -v 4.2.1
-
Bundler
gem install bundler -v 1.17.3
-
PostgreSQL (Required for Heroku compatibility)
psql --version
-
Clone the repository
git clone <repository_url> cd puchumaldito
-
Install dependencies
bundle install
-
Configure the database
Editconfig/database.ymland ensure PostgreSQL is configured correctly. -
Set up the database
rake db:create db:migrate db:seed
Start the Rails server:
rails server -b 0.0.0.0 -p 3000Visit http://localhost:3000 in your browser.
-
Login to Heroku
heroku login
-
Create a Heroku app (if not already created)
heroku create puchumaldito
-
Set the buildpack for Ruby
heroku buildpacks:set heroku/ruby
-
Deploy the app
git push heroku main
-
Run database migrations on Heroku
heroku run rake db:migrate
-
Open the app in a browser
heroku open
-
If Bundler fails due to old dependencies:
bundle update
-
If PostgreSQL connection fails:
Ensure the Heroku database is set up correctly:heroku addons:create heroku-postgresql:hobby-dev
Let me know if you need further refinements! 🚀