Heroku push rejected, the path to rails engine does not exist - ruby-on-rails

When attempting to deploy my rails app on heroku,
git push heroku master
I get the following error:
remote: Fetching gem metadata from https://rubygems.org/........
remote: The path `/tmp/fullcalendar-rails-engine` does not exist.
remote: Bundler Output: Fetching gem metadata from https://rubygems.org/........
remote: The path `/tmp/fullcalendar-rails-engine` does not exist.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
The path is referencing a rails engine (https://github.com/vinsol/fullcalendar-rails-engine) which is included in my Gemfile. However I don't ever reference a tmp folder in '/tmp/fullcalendar-rails-engine'.
I'm not sure how to address this issue. Just to see if I could deploy my app, I tried removing the gem from the Gemfile and commented out the mounting in my app but even when trying to push the deploy after that, I still received the same error.

Might be a bit of a dirty fix, but I added the indicated folder to the tmp folder of the project. Still curious about why this happened and if making that actually solved anything.

Related

"Push rejected, failed to compile Ruby app" installation of decdim on herouku

I'm trying to install decidim (decidim.org) on herouku, I get this error when i make the deploy
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run bundle install elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: The gemspecs for path gems changed
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Push rejected, failed to compile Ruby app.
remote:
remote: ! Push failed
remote: Verifying deploy...
this is the end lines of the deploy.
anyone has an answer for this issue?
thanks
Go to the folder where you have your app and try typing the command: bundle install then try pushing to heroku afterwards.

Cannot push to Heroku (gemfile.lock issue)

Summary:
When pushing to my staging app, Heroku complains that bundle install failed and that I need to run bundle install elsewhere and version the resulting Gemfile.lock. The problem is that I've already done this and committed it.
How do I fix this?
Issue:
Due to some inherited awfulness at work, I had to debug and fix several things in production. Everything's working now, but this means our master branch is ahead of staging by 10+ commits, including some gem changes. I merged them and attempted to push to my staging app on Heroku.
However, I didn't run bundle install after merging in the changes (shame on me), so Heroku correctly complained.
To fix this, I ran the standard:
bundle install
git add Gemfile.lock
git commit -m "Updated gem bundle"
git push staging
However, Heroku is still complaining about Gemfile.lock:
Counting objects: 228, done.
Delta compression using up to 6 threads.
Compressing objects: 100% (179/179), done.
Writing objects: 100% (192/192), 24.38 KiB | 0 bytes/s, done.
Total 192 (delta 127), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Using set buildpack heroku/ruby
remote: -----> Ruby app detected
remote: -----> Compiling Ruby/Rails
remote: -----> Using Ruby version: ruby-2.2.2
remote: -----> Installing dependencies using bundler 1.11.2
remote: Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
remote: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote: You have deleted from the Gemfile:
remote: * ruby-drupal-hash
remote: Bundler Output: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: You have deleted from the Gemfile:
remote: * ruby-drupal-hash
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to redacted-staging.
remote:
To https://git.heroku.com/redacted-staging.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/redacted-staging.git'
Also:
Gemfile.lock is not in .gitignore
bundle install runs fine, and does not update any gems (as I've run it several times now).
To verify my sanity, I checked git status and git log to ensure I actually added and committed the changes; I'm apparently not crazy (though please correct me if i'm wrong).
To reiterate:
I have already run bundle install and added & committed Gemfile.lock
How do I fix this?
What am I missing?
Update:
I've tried
running bundle update which updated 26 gems; committing the new Gemfile.lock and pushing results in the same error.
Deleting and re-bundling produces an identical Gemfile.lock. Adding a newline and pushing results in the same error.
Removing Bundler's version info from Gemfile.lock and pushing results in the same error.
I even re-addded the ruby-drupal-hash gem, ran bundle install, and pushed the new Gemfile and Gemfile.lock files. Interestingly, the error message about me deleting ruby-drupal-hash persisted despite it being present again.
I assume that you are working locally on different OS then your server is, for example windows vs Unix.
In order to fix it you simply have to build it with the following flag:
bundle install --deployment
If this is not working as well, simply delete the .lock file and let it be generated again in the same flow as you did before with install/update
Yeah, trying to run bundle update or if it didn't work, I think this line it's look interesting:
remote: You have deleted from the Gemfile:
remote: * ruby-drupal-hash
remote: Bundler Output: You are trying to install in deployment mode after changing
remote: your Gemfile. Run `bundle install` elsewhere and add the
remote: updated Gemfile.lock to version control.
remote:
remote: You have deleted from the Gemfile:
remote: * ruby-drupal-hash
It seems it is complaining about ruby-drupal-hash being removed from Gemfile but Gemfile.lock not reflecting it.
You have deleted from the Gemfile:
remote: * ruby-drupal-hash
I would check the Gemfile and Gemfile.lock for that particular gem and see if that is the problem.
The answer was deceptively simple (of course):
git push staging staging:master
The issue was that I was on the staging branch and needed to update my Heroku staging server's master branch.
Shame on me for overlooking something so obvious!
... and shame on Heroku's decidedly unhelpful output.
For future internet explorers, I had a similar situation.
I had to change the version of a gem dependency, so I had to manually add "Execjs, '2.7.0'" to my gemfile, since another gem update had pulled it to 2.8.0 and that was causing an issue on Heroku.
Once I got the dependency updated, I removed the gem from the gemfile (while it remained in the gemfile.lock) and never did a bundle install to clean up the gemfile.lock When I tried to push to Heroku, it broke and I got the same error.
To fix, I ran bundle install on the master branch and then committed the new gemfile.lock and then pushed to Heroku and it deployed as expected.
VERY stressful morning for me! :-)

Can't push rails code to Heroku from Cloud9 because of sqlite

An error occurred while installing sqlite3 (1.3.10), and Bundler cannot
remote: continue.
remote: Make sure that `gem install sqlite3 -v '1.3.10'` succeeds before bundling.
remote: !
remote: ! Failed to install gems via Bundler.
remote: !
remote: ! Detected sqlite3 gem which is not supported on Heroku.
remote: ! https://devcenter.heroku.com/articles/sqlite3
remote: !
remote:
remote: ! Push rejected, failed to compile Ruby app
remote:
remote: Verifying deploy...
remote:
remote: ! Push rejected to stark-reaches-8517.
remote:
To https://git.heroku.com/stark-reaches-8517.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com....
First I installed the latest sqlite3, but it didn't help. Then I tried to switch from sqlite to postgresql, but it didn't work out either (or I just missed something). Can somebody tell me how the gem file should look like before bundling? Btw. I am trying to follow Michael Hartl's Rails Tutorial, but it doesn't mention anything about this.
Added:
I have the rails_12factor and postgres gems in the production group. sqlite3 is in the development group so heroku should not attempt to install it.
When you used postgresql did you have add a Procfile to your app with this line:
web: bundle exec thin start -p $PORT
I use the following in my gem file, in addition to postgres to deploy to heroku
#User the 'thin' server instead of the default webrick
gem 'thin'
#Use postgres and the Heroku rails gem for Heroku
group :production do
gem 'rails_12factor'
end
Also, have you checked out the heroku help center? It jumps around a little bit, but goes into more detail about defing a Profile.
https://devcenter.heroku.com/articles/getting-started-with-ruby#introduction

Cannot push to heroku - bundler fails

I'm trying to push my rails project to heroku bit when doing a git push heroku master bundler fails with the following message:
Bundler Output: Fetching gem metadata from https://rubygems.org/.........
Fetching additional metadata from https://rubygems.org/..
Fetching git://github.com/justinfrench/formtastic.git
Fetching git://github.com/activerecord-hackery/ransack.git
Fetching git://github.com/gregbell/active_admin.git
Could not find jwt-0.1.12 in any of the sources
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby app
To git#heroku.com:murmuring-mountain-9361.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:murmuring-mountain-9361.git'
It seems jwt is a dependency of one of my gems, but it installs fine on my local environment. I tried explicitly declaring gem 'jwt', '0.1.12' in my gemfile, which worked fine locally, but not on heroku and I tried deleting the Gemfile.lock and generating it again. I even tried deleting the app instance off heroku and creating it again.
The following gist is my gemfile: https://gist.github.com/anonymous/84d3fc00566e036729cd
I'm using this vagrant box for my dev environment: https://github.com/ejholmes/vagrant-heroku
If you updated your gems in the last few days then you would have gotten a faulty version that was yanked. It was re-released as 1.0.0 because it has a slightly different API. I'd recommend using 0.1.11 or switching to 1.0 ... thanks, and sorry!
You'll get this when versions of Gems you are using (via your Gemfile.lock) have been yanked from RubyGems.org and Heroku is trying to grab them when you deploy.
You can see that 0.1.12 of jwt has been yanked at http://rubygems.org/gems/jwt/versions. The thing to do would be to look at your Gemfile.lock to see which gem is declaring the dependency on 0.1.12 and then fork that gem and bump the version and then use your forked version. Or contact the Gem owner and gem them to bump the dependency.

Heroku / Bundler / Push issue: Could not find rake-0.8.7 in any of the sources

For the life of me I can not figure out how to fix this issue. I have looked around for the whole day and found simular issues but they all seem to be slightly different.
-----> Heroku receiving push
-----> Rails app detected
-----> Configure Rails to log to stdout
Installing rails_log_stdout... done
-----> Gemfile detected, running Bundler version 1.0.7
Unresolved dependencies detected; Installing...
Using --without development:test
Your Gemfile doesn't have any sources. You can add one with a line like 'source:rubygems'
Could not find rake-0.8.7 in any of the sources
FAILED: http://docs.heroku.com/bundler
! Heroku push rejected, failed to install gems via Bundler
error: hooks/pre-receive exited with error code 1
To git#heroku.com:smooth-wind-620.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git#heroku.com:
Bundle install and bundle list both have rake listed.
Have you tried adding something like source 'http://rubygems.org' to the top of your Gemfile, or source :gemcutter? That's the first error I see heroku giving you and would be the first thing I would try to resolve.

Resources