Going up Ruby on Rails app in Heroku

Asked

Viewed 760 times

2

I completely followed what was written on that tutorial and I got this mistake:

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 didn’t file for log.

I did what the Gypsy asked and it’s wrong:

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 ultimate 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 climb a simple application on Node that has already run on Node shelll, but when I command Heroku create (before the deploy) gives that blue screen of application error in the browser.

1 answer

2

The mistake is clear.

Gemfile.lock required. Please check it in.

Before you push again, run:

bundle install

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

gem install sqlite3 -v '1.3.9'

Then run it again bundle install.


About the Sqlite-related error, Heroku does not support Sqlite with good reason. Modify your file Gemfile to use Sqlite only in development. That is, check whether the gem is as in the following example:

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

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

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

Made these changes in your Gemfile, try again a bundle install and then the deploy.

  • 1

    There’s a message for you: http://answall.com/review/suggested-edits/11124

  • Gypsy, I would already recommend using Postgres in development environment. Even though Activerecord abstracts SQL, problems can occur when trying to use a database other than the one used in development, especially when speaking in Sqlite. I say from experience.

  • @Brasofilo Worse... did not understand the message bulhufas, and do not know well Raspberry Pi to reply.

  • @Andrey Ah, yes. I also prefer to use a database very similar to the production instance. For the scope of the answer, I have to consider the most basic project possible, so the answer has to necessarily involve the Sqlite.

  • Regarding the message I left: (http://answall.com/questions/17305/como-subir-meu-projeto-node-js-para-o-heroku). This topic ai has been incomplete. Raspberry pi uses an application (ddclient), p/ fix a port on the router to a DDNS (Dynamic DNS) address. Even using Heroku, I imagine I need it to access my Raspberry Gpios on my local network.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.