Heroku db:push fails with segfault - heroku

I am installing a new Heroku app for Rails 3.1, Ruby 1.9.2. The problem is in doing 'heroku db:push' to populate the database (which has been duly schematized--the only problem now is getting it some data). It fails with the following report:
/Users/upstill/.rvm/gems/ruby-1.9.2-p290/gems/sqlite3-1.3.5/lib/sqlite3/sqlite3_native.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2010-01-10 patchlevel 249) [universal-darwin11.0]
Abort trap: 6
This is puzzling for two reasons: one, I am using a postgresql database both locally and on heroku (duly declared in config/database.yml). And two, where has ruby 1.8.7 got to do with anything? rvm is set up for 1.9.2, it's on my path, and yet heroku is trying to run it? What gives?
Thanks,
Steve Upstill

Had this problem as well, it was extremely annoying but eventually I got it to work. I had the toolbelt installed but it started working once I did this:
gem install heroku
sudo gem install taps
Yes, the toolbelt is already installed but I think this really fixed it.
Plenty of people are having this problem, you're not alone.
Hope this helps (:

Your code is trying to run the 1.9.2 version of SQLite using Ruby 1.8.7.
I would suggest switching to 1.9.2 before trying your push.
rvm use 1.9.2-p290
heroku db:push
Ideally you want to be switching to 1.9.2 full stop.

Related

Install Ruby 1.9.3 or 1.9.2 for Rails Apps

I'm installing a new server for run Rails apps, I already have 1 app that I want to deploy, but it is on Ruby 1.9.2.
Which version of Ruby do you recommend me to install on the server, Ruby 1.9.3 (now the stable) or Ruby 1.9.2 ?
I would in any way suggest you use RVM since you may end up having to deploy another app too. And being able to switch rubies around is always nice.
Once RVM is up you can simply try it on 1.9.3 and 1.9.2 and use the latest that is working.
I would recommend using ruby 1.9.3 as the stable version comes with a patch for require which should increase the speed of your rails app, but as always: benchmark is not your enemy!
Also AFAIK any ruby code written for ruby 1.9.2 should work just fine on 1.9.3, but not vice versa.So it should be save to move your app to 1.9.3.
Try your app on 1.9.3 and if it works then use that, otherwise consider if porting it to 1.9.3 is worth the time. There shouldn't be any issues but you should make sure.

problem with installing ruby 1.9.2 on OS X 10.6.8

i am new to Mac and Ruby on Rails. so, please do understand me if i am posting a dumb question. but, i have been struggling with this problem for a few days with no progress, so i really need some help.
i installed ruby 1.9.2 with RVM. but, when i type "ruby -v" command after installation, it says that the ruby version i have is 1.8.7. so, i have tried "rvm use 1.9.2" command, but it still says my ruby version is 1.8.7. i even re-installed ruby 1.9.2 using RVM a few more time, but no luck. when i typed "rvm list", it says ruby-1.9.2-p290. does that mean my rvm did install ruby 1.9.2, but for some reason, i cannot even get my RVM switch to ruby 1.9.2 from ruby 1.8.7?
what can i do to use ruby 1.9.2??
[added on Aug. 15th] By the way, I just type "rvm info", and it says "ruby-1.9.2-p290" and then all the other stuff explaning. Does that mean that my rvm already has switched ruby to 1.9.2??? But, then, why "ruby -v" keeps saying ""ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]"???
You're probably using a different rvm set when u open terminal..
Since OS X doesn't come with Ruby 1.9.2.., you are being defaulted to the system installation of Ruby.
CLICK FOR LINK :):)
Check out this link to learn how to set a default Ruby version.
I am writing an answer to my own question for anyone with the same problem that I've suffered!
The problem was with "rvm"!
I updated rvm instead of removing it (in some cases, it would be a good idea to completely remove rvm from your system, and re-install it). I followed rvm instructions: http://beginrescueend.com/rvm/install After updating rvm, I was able to install Ruby 1.9.2(!!), and the problem with
"rake" command was gone!!!
I should have suspected rvm sooner, then I wouldn't have wasted one week!
PS Try avoid using sudo when it is not necessary when installing. Someone mentioned that he/she used "sudo" to install when he/she didn't have to, and it just created the same problem as I was having!

gem install capistrano failure

I tried to install the package "capistrano" on a linux box but got the following error:
*** buffer overflow detected ***: /usr/bin/ruby terminated
Additionally it showed me a list of the memory map and then the install process was aborted.
Any idea on what causes this error?
Cheers
Roland
I had similar issue when installing Capistrano on CentOs 6.7, Ruby 1.8.5, gem 1.3.1. Turns out the issue was caused by newest highline package.
The following allowed me to install capistrano correctly:
gem install highline --version "=1.6.2"
gem install capistrano --version "=2.6.0"
This error may be related to some Ruby 1.8.6 bugs (see this post http://opsrealism.tumblr.com/post/4931621276/mirroring-rubygems-and-ruby-9-2-on-centos-5-5 for some more details), so you may try to upgrade your Ruby to 1.8.7, if it's possible.
Another option is to try to install a bit older version of gem - it worked for me on a couple of occasions, where exact gem versions didn't matter. For example,
gem install capistrano --version "=2.7.0"
might work.
I'm running:
Centos 5.5
Ruby 1.8.5
Gems 1.3.1
I narrowed the problem down to the highline gem. Although I attempted to intall all of its dependencies manually (which worked), it still failed to load itself unless I followed the above advice and specified the version, 1.6.2. =(
gem install highline --version "=1.6.2"
Hopefully, I'll be migrating off of this ancient OS soon.
I had similar issues installing cap for CentOS 5.8 but it worked using the rvm installer (to upgrade to latest ruby, I used 1.9.2p320 (2012-04-20 revision 35421) [x86_64-linux])
What I d
I yum remove ruby (to get rid of 1.8.x)
I followed simple instructions at https://rvm.io/rvm/install/ for installing rvm
gem install capistrano
cap command is found!
Hope this helps someones

RVM Ruby Abort Trap Segmentation fault, switching directories and doing rvm use ree works

I have a very very weird problem. My rvm setup is ruby enterprise edition (ree 2011-02-18 patchlevel 334), it is set to be the default (rvm use ree --default). I am on rvm 1.6.13 and on a rails 3 project.
Now: once i try to run rails s, rails c, or any rake command I get the following:
/Users/florianvallen/.rvm/gems/ree-1.8.7-2011.03#flats/gems/mysql2-0.2.7/lib/mysql2/mysql2.bundle: [BUG] Segmentation fault
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-darwin10.4.0], MBARI 0x6770, Ruby Enterprise Edition 2011.03
Abort trap
which ruby is: ~/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby
The weird thing is that i can resolve that with rvm use ree
which tells me Using /Users/florianvallen/.rvm/gems/ree-1.8.7-2011.03
After that everything works. Now, one might think that putting rvm use ree in your ~/.profile would at least solve the problem, but when i switch directories with cd .. and enter the rails project again, I get the same thing, [Bug] Segmentation fault...
Does anyone have an idea why this is like that?
Any help is highly appreciated, thank you!
The issue has been solved as the installed gems werent in the correct gemset. weirdly the gemset has not been created when switching to the directory even though it has been defined by the .rvmrc in that directory.
Removing and installing the gemset again has solved the issue.
Are you sure the gems you installed with your rails project were installed under ree? The gems have C extensions which are dependent on your ruby version which is probably your problem. Remove all of your gems and rebundle/reinstall them under rvm ree.

Bus Error - What causes this in Ruby?

I have run into this error 5 or 10 times over the past few years and have never found a clear answer to this problem. Here is the error:
$ rake db:migrate
/usr/lib/ruby/gems/1.8/gems/libxml-ruby-0.9.5/lib/libxml_ruby.bundle: [BUG] Bus Error
ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.7.0]
Abort trap
The app I am running this in is using RMagick.
I have run into this problem when installing ImageMagick a while ago, and when installing Nokogiri, and when installing MySQL. For Nokogiri it was because I needed a more recent version of libxml. What are your thoughts on this? Any fixes? How can I check the version of RMagick the project is loading?
I am on a Mac, 10.5.8.
Thanks for the help,
Lance
I hit this issue running a worker in resque after upgrading Ruby from 1.8.6 to 1.8.7:
$ QUEUE=* rake resque:work
(in /Users/kimball/pulse)
/usr/local/lib/ruby/1.8/openssl/ssl-internal.rb:30: [BUG] Bus Error
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin9.8.0]
Abort trap
Found this, but pretty much just says upgrade to 1.9.1:
http://redmine.ruby-lang.org/issues/show/405
If anyone knows how to fix it in 1.8.7, I'd be grateful.
Kimball

Resources