Heroku: push reject - failed to set gems through a bunch

I tried to press the application on Heroku in the same way as always. I am using Ruby 1.9.2 and Rails 3.2.1. However, now I get this error message. I did what he recommends

make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling. 

Note that he does this, although I did in my gemfile

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

but do gem install sqlite3 -v '1.3.5' in the terminal, but the click is still rejected. I'm not sure how to check the Gem files that it refers to in the tmp directory, but even if I did, I would not understand them

Any suggestions?

 Gem files will remain installed in /tmp/build_1timyd7o5k59l/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5 for inspection. Results logged to /tmp/build_1timyd7o5k59l/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.5/ext/sqlite3/gem_make.out An error occurred while installing sqlite3 (1.3.5), and Bundler cannot continue. Make sure that `gem install sqlite3 -v '1.3.5'` succeeds before bundling. ! ! Failed to install gems via Bundler. ! ! Heroku push rejected, failed to compile Ruby/rails app 
+6
source share
4 answers

I always just comment on the SQLite3 stone, and it works fine for me, so when I click on the hero, my gemfile looks like this:

 # Development Database #gem 'sqlite3' # Production Database gem 'pg' 

EDIT:

The above solution works, and it's easy if you don't want to update your gems for any reason. The best long-term solution to this problem is the following:

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

then delete the gemfile.lock file. You will need to create a new gemfile.lock file to reflect your changes. In terminal run:

 bundle update 

Finally, update your repository and click on the hero by doing the following in the terminal:

 git add . git commit -m "commit message" git push heroku 
+9
source

Actually your Gemfile source code was correct if you want to use sqlite3 locally. as you showed, you put this in the gem file:

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

then you need to delete the local Gemfile.lock file and run:

 bundle update 

to restore the .lock file. then add and re-commit the gemfile:

 git add Gemfile git commit -m "Gemfile commit message" 

then click the new gemfile on the repo:

 git push master 

change the GIT data accordingly, of course, but you get the point. all about adding / fixing / pushing the Gemfile.

+2
source

As far as I know, Heroku does not support sqlite3, but instead you use a PostgreSQL database. You will need to modify your Gemfile as such and your database.yml. Therefore, for your production team in your Gemfile, you will need:

https://devcenter.heroku.com/articles/rails3

edit:

Here seems to be a more detailed answer, so it could be a duplicate: Pushing Rails from SQLite3 to Heroku fails

+1
source

you have to add the updated Gemfile.lock file to git and try git to press the hero master ... this worked for me, and it will be for you too.

and don't forget to add config.action_controller.perform_caching = true

+1
source

Source: https://habr.com/ru/post/917269/


All Articles