Uploading Ruby on Rails application to Heroku

2

I completely followed what was written in this tutorial and I got this error:

root@neuber-HP-EliteBook-8460p:/home/neuber/node-js-sample/franca# git push heroku master
Warning: Permanently added the RSA host key for IP address '50.19.85.154' to the list of known hosts.
Initializing repository, done.
Counting objects: 60, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (49/49), done.
Writing objects: 100% (60/60), 14.00 KiB, done.
Total 60 (delta 2), reused 0 (delta 0)

-----> Ruby app detected
-----> Compiling Ruby/NoLockfile
 !
 !     Gemfile.lock required. Please check it in.
 !
 !     Push rejected, failed to compile Ruby app

To [email protected]:loveforme.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:loveforme.git

I did not generate log file.

I did what Gypsy asked and left error:

Gem files will remain installed in /var/lib/gems/1.9.1/gems/sqlite3-1.3.9 for inspection.
Results logged to /var/lib/gems/1.9.1/gems/sqlite3-1.3.9/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.9), and Bundler cannot continue.
Make sure that 'gem install sqlite3 -v '1.3.9'' succeeds before bundli

I installed SQLite3 1.X.X and now gave the final error:

 !
 !     Failed to install gems via Bundler.
 !     
 !     Detected sqlite3 gem which is not supported on Heroku.
 !     https://devcenter.heroku.com/articles/sqlite3
 !

 !     Push rejected, failed to compile Ruby app

To [email protected]:loveforneuber.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:loveforneuber.gi

I'm trying to upload a simple Node application that has already run in the Node shelll, but when the Heroku create (before deploy) command gives that blue application error screen in the browser.

    
asked by anonymous 30.05.2014 / 23:42

1 answer

2

The error is clear.

  

Gemfile.lock required. Please check it in.

Before pushing again, run:

bundle install

In the case of the second error pointed out, first execute this command:

gem install sqlite3 -v '1.3.9'

Then run bundle install again.

On error related to SQLite, Heroku does not support SQLite with good reasons . Modify your Gemfile file to use SQLite only in development. That is, make sure that the declaration of gem is as in the following example:

group :development do
  gem 'sqlite3', '1.3.9'
end

Also check if there is gem for Postgres (database that Heroku uses):

group :production do
  gem 'pg', '0.15.1'
end

Once you've made these changes to your Gemfile , try again bundle install and then deploy.

    
30.05.2014 / 23:47