When I try to run heroku console I get the following error:
user#omnipresent:~/rails/demo$ heroku console
! This version of the heroku gem has been deprecated.
! Please update it by running: gem update heroku
When I do the update..it says there is nothing to update!
user#omnipresent:~/rails/demo$ gem update heroku
Updating installed gems
Nothing to update
Following are my versions:
user#omnipresent:~/rails/demo$ heroku version
heroku-gem/1.5.2
user#omnipresent:~/rails/demo$ ruby -v
ruby 1.9.1p0 (2009-01-30 revision 21907) [i686-linux]
user#omnipresent:~/rails/demo$ rails -v
Rails 2.3.5
running heroku list shows following:
user#omnipresent:/usr/bin$ gem list heroku
*** LOCAL GEMS ***
heroku (1.8.5, 1.8.3, 1.8.0, 1.5.2)
Even though I already had 1.8.5...I guess installing it again forces the class cache update.
user#omnipresent:~/rails/seconddemo$ sudo gem install heroku
Successfully installed heroku-1.8.5
1 gem installed
Installing ri documentation for heroku-1.8.5...
Updating class cache with 3098 classes...
Installing RDoc documentation for heroku-1.8.5...
user#omnipresent:~/rails/seconddemo$ heroku console
Ruby console for myapp.heroku.com
>>
Related
I'm trying to deploy Zipsell with heroku. However when I run through the heroku and ruby setup and try to deploy via:
git clone https://github.com/yongfook/zipsell
cd zipsell
./bin/setup
I get the error message:
An error occurred while installing pg (1.0.0), and Bundler cannot continue.
Make sure that gem install pg -v '1.0.0' --source 'https://rubygems.org/' succeeds before bundling.
In Gemfile:
pg
I have run through the setup process now multiple times and reinstalled all but still am not able to deploy. Any idea what is going wrong?
From the repo you posted it seems the error message is very clear. From the Gemfile of the repo you shared it seems you haven't install pg which is the postgresql (You will need to remove sqlite.
The problem is that there are some missing dependencies that you don't have installed and that why the error is thrown. There is the concepts of gems which is packaged code. https://rubygems.org/ via the following website you can find some of the gems you'r missing. There is also the versions which have to be compatible.
What you'll do is search for the missing gems shown in the error message. Check for the correct version if you the gem in your Gemfile but the version is conflicting.
https://github.com/yongfook/zipsell/blob/master/Gemfile
bundle update
install the missing gems
gem install pg
and so on. Or do it straight in the Gemfile.
I am having a problem with my application not being uploaded to heroku. When I typed in:
git push heroku master
I get an error at the end:
**Results logged to /tmp/build_2akv91a7tpdfl/vendor/bundle/ruby/1.9.1/gems/sqlite3-1.3.7/ext/sqlite3/gem_make.out
An error occurred while installing sqlite3 (1.3.7), and Bundler cannot continue.
Make sure that gem install sqlite3 -v '1.3.7' succeeds before bundling.
!
! Failed to install gems via Bundler.
!
! Push rejected, failed to compile Ruby/Rails app**
When i tried installing the gems its asking for, and redid the process the same error message comes up even after i installed 'gem install sqlite3 -v '1.3.7.''
(For those who are following Michael Hartl rails tutorials i followed it by detail but I'm still getting an error message.)
Any help will be greatly appreciated. I am new to rails so if you have a solution, please do speak in layman's terms.
I don't think you can use sqlite3 on Heroku. You can use postgres instead.
Remove sqlite3 gem and add pg gem in your Gemfile.
gem 'pg'
Since Heroku provides you a PostgreSQL database for your app, edit your Gemfile and change this line:
gem 'sqlite3'
To this:
gem 'pg'
I need to specific the ruby version in my gemfile but my app in heroku is using the old bundler version 1.0.7.
If I include gem 'bundler', '1.3.2' in my gemfile it failed when I push to heroku.
Bundler could not find compatible versions for gem "bundler":
In Gemfile:
bundler (= 1.3.2)
Current Bundler version:
bundler (1.0.7)
Your version of Bundler is older than the one requested by the Gemfile.
Perhaps you need to update Bundler by running `gem install bundler`.
I also try running heroku run "gem install bundler" and it return permission error.
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions into the /usr/ruby1.9.2/lib/ruby/gems/1.9.1
directory.
How can i set the Bundler version to 1.3.2 in heroku so that I can specific ruby version?
Heroku manages bundler as part of stack. I'm guessing you are on the Bamboo stack as that uses 1.0.7 whereas Cedar is using 1.3.x version.
If you're on Bamboo then you don't have any options I'm afraid, aside from upgrading to Cedar where you will get all the latest goodness.
Tried to install Heroku Toolbelt but now I get a Gem:LoadError error when trying to issue any heroku command.
$ heroku -v
/Users/xyz/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in
`to_specs': Could not find heroku (>= 0) amongst [...]
(Gem::LoadError)
$ which heroku
/Users/xyz/.rvm/gems/ruby-1.9.3-p194#global/bin/heroku
It seems it's still seeking the gem, but I already uninstalled it. How can I fix this?
(OSX Mountain Lion)
I might be misunderstanding the issue, but if it is just that the heroku gem is not installed/missing try:
$ gem install heroku
I had the same issues initially with ROR on Windows/OS X.(Everyone suggested me to move to LINUX/UNIX)
Rather than installing the Heroku Toolbet (which breaks ruby and rails which is already installed) install the heroku gem along with foreman gem.
gem install heroku
gem install foreman
Then you can use it easily.
I get the following error message:
heroku db:pull --debug postgres://USERNAME:PASSWORD#localhost/test
Loaded Taps v0.3.23
Warning: Data in the database 'postgres://USERNAME:PASSWORD#localhost/test' will be overwritten and will not be recoverable.
Receiving schema
Unable to fetch tables information from http://heroku:foo9dsfsdfsdb465ar#taps19.heroku.com. Please check the server log.
The command above does not produce any messages in the log that can be viewed using 'heroku logs'.
Any idea what I am doing wrong?
Use pgbackups instead of taps/db:pull
http://devcenter.heroku.com/articles/pgbackups
I answered to similar problem here:
Unable to fetch tables information when running heroku db:pull
I found some kind of work-around.
I have the same problem with my SHARED_DATABASE on heroku
ruby 1.9.2
gems:
pg (0.11.0)
heroku (2.32.4)
heroku-api (0.3.5)
taps (0.3.24)
heroku db:pull ended with:
Unable to fetch tables information from http://...#taps19.heroku.com. Please check the server log.
I switched to ruby 1.8.7 using rvm and heroku db:pull works fine.
Back again to ruby 1.9.2 to develop my application.
I hope this help someone until db:pull will be fixed with ruby 1.9.2.
Was able to get it going by reverting back to ruby 1.9.3 and Rails 3.1.0.
Here are some instructions on how to do that with rvm:
$ rvm install 1.9.3
$ ruby -v
$ rvm use 1.9.3-p286
$ rvm gemset create rails310
$ rvm 1.9.3-p286#rails310
$ rails -v
$ gem install rails -v 3.1.0
$ rvm gemset list
$ heroku db:pull –app <yourapp>
$ gem install taps
$ gem install sqlite3
$ heroku db:pull –app <yourapp>
More reading on rvm can be found here: http://rvm.io/gemsets/basics