ruby-2.0.0-p353 [BUG] Bus Error while running rspec - ruby

Whenever I run rspec, I get this long error message.
/Users/jkim/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks: [BUG] Bus Error
ruby 2.0.0p353 (2013-11-22 revision 43784) [x86_64-darwin11.4.2]
See the full error here.
http://hastebin.com/vuvucemawo.pas
Note that the rspec tests ran correctly.
What are some things I can try to fix this issue?

I meet the same issue.
Here is the full stack trace: https://gist.github.com/proxygear/8658364
I'm on a mac with ruby-2.0.0-p353 installed via rvm
I don't get any bus error except when running spec (server, console work fine).
The closest error I found on stackoverflow is BUG Bus Error ruby 1.8.7 but is connected with installing ruby more than runtime error.

Related

How can i fix Errno::ENXIO for a ruby gem installation (postgresql)

When running a ruby installation i expected to simply load a postgresql gem.
commonly this is done using gem install postgresql, however i encounter the following error:
MAINPATH\Ruby\bin>gem install postgresql --debug
NOTE: Debugging mode prints all exceptions even when rescued
Exception 'NameError' at MAINPATH/Ruby/lib/ruby/2.3.0/fiddle/import.rb:154 - uninitialized constant Fiddle::Function::STDCALL
Exception 'Errno::ENXIO' at MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/spec_fetcher.rb:62 - No such device or address # rb_file_s_stat - Z:/
ERROR: While executing gem ... (Errno::ENXIO)
No such device or address # rb_file_s_stat - Z:/
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/spec_fetcher.rb:62:in 'stat'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/spec_fetcher.rb:62:in 'initialize'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/spec_fetcher.rb:43:in 'new'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/spec_fetcher.rb:43:in 'fetcher'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/resolver/installer_set.rb:38:in 'initialize'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/dependency_installer.rb:441:in 'new'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/dependency_installer.rb:441:in 'resolve_dependencies'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:194:in 'install_gem'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:255:in 'block in install_gems'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:251:in 'each'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:251:in 'install_gems'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/commands/install_command.rb:158:in 'execute'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/command.rb:310:in 'invoke_with_build_args'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:169:in 'process_args'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/command_manager.rb:139:in 'run'
MAINPATH/Ruby/lib/ruby/site_ruby/2.3.0/rubygems/gem_runner.rb:55:in 'run'
MAINPATH/Ruby/bin/gem:21:in '<main>'
Normally I know how to avoid these errors but for this one I am clueless. anyone got suggestions?
Currently running PG9.5, PG10 and PG12 (different ports) and all encounter that error.
Additional information:
gem -v
2.6.6
ruby -v
Ruby interpreter (CUI) 2.3.1p112 [x64-mingw32]
There is a known issue of network drives
Please check this if it is relevant -
https://github.com/oneclick/rubyinstaller/wiki/Troubleshooting#network_drive_home

How to fix "uninitialized constant Gem::GEM_PRELUDE_SUCKAGE" in RubyGems tasks

My RubyGems isn't working, throwing an error which goes as follows, triggering (nearly) on any Gem task:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems.rb:1081:in `<top (required)>': uninitialized constant Gem::GEM_PRELUDE_SUCKAGE (NameError)
from <internal:gem_prelude>:1:in `require'
from <internal:gem_prelude>:1:in `<compiled>'
I'm new to Ruby / RubyGems / installing Ruby and all I know is that an uninitialized constant is essentially a undefined variable. It could also be possible that it's something with Ruby itself, although the ->Gem:GEM<-_PRELUDE_SUCKAGE points me to RubyGems.
In a nutshell, I installed a bunch of Ruby things (think RVM, rbenv, etc.) to develop Ruby on Rails, as I thought it would be a good way to learn Ruby.
Well, after going through a long and tedious process to upgrade Ruby to 2.6.3, then downgrade to 2.5.5 and then 2.4.0, then back up to 2.5.5 and solving downgrade issues, RubyGems throws the error. I settled on 2.5.5 because 2.6.3 caused errors and 2.4.0 was too early of a version.
It's causing all sorts of errors, like HAML not compiling and Rails not making a controller. I really don't know what's happening.
If I run gem install [gem name], it throws the error. Running rails generate controller [name] index (for those not familiar to Rails this creates, well, a controller) it throws the error. Doing anything really with the gem command causes the error, except for gem server.
If I upgrade back up to the latest Ruby version, I fear that my gem command will go all wonky again and I'll have to go through another day of troubleshooting versions. How do I fix this, or at least get rid of the message so I can create things again?
I had this happen to me just today. It seems, somehow, my ruby version had been corrupted. When I ran rvm list version 2.5.1 was listed as 'broken'. I had to uninstall 2.5.1 fully (using sudo even in my case) to get to a clean slate.
Then, when attempting to reinstall, rvm was giving me all kinds of grief after a new gpg key which I initialy couldn't get to install properly (hint).
After a clean wipe of ruby 2.5.1, updating rvm to latest version and reinstalling, I got this error: Error running 'env GEM_HOME=/ruby-2.5.1#global GEM_PATH= /Users/user/.rvm/rubies/ruby-2.5.1/bin/ruby -d /Users/user/.rvm/src/rubygems-3.0.8/setup.rb --no-document',.
It appears that an update to MacOSX deprecated a version of OpenSSL which causes some issues. I ended up following this thread and ran rvm gemset create global --default and then bundle install to get passed the Gem errors.
Honestly, rails is supposed to be easier than this. I wish docker was easier to reason about sometimes. These are the kinds of issues docker supposedly promises to fix eh?

Ruby Shoes App, Gem Chef: bad response Not Found 404

I'm trying to write a Shoes app that will call Chef classes and modules. To accomplish this, I'm using Shoes 3.2.21-gtk2 and using the following code before my Shoes app code:
Shoes.setup do
gem 'chef'
end
Shoes.app do
...
end
When I run the app from Shoes, it attempts to install chef, and even determines the latest version (12.0.3) however, I get the following error during the installation:
bad response Not Found 404 (https://rubygems.global.ssl.fastly.net/quick/Marshal.4.8/pry-0.10.1-x86-mingw32.gemspec.rz)
This version of Shoes is using Ruby 2.1.5-p273, which satisfies the minimum requirement of the Chef gem: https://rubygems.org/gems/chef
Is there some bug in Shoes with its ssl code? Or am I missing something else?
I got this error too.
The error occurs when trying to install the "pry gem". In my case was a bug that happened in my old version of rubygems (2.4.6).
FIX:
1 - Install another version of rubygems
gem update --system 2.4.4
2 - Install pry
gem install pry
The error also happens with the 2.4.5 version of rubygems: https://github.com/rubygems/rubygems/issues/1120

fusion passenger issue with json gem when running on nginx

I have spent the better half of today trying to resolve an issue where fusion passenger fails to process the request due to some segment fault issue within the json gem.
There have been similar posts regarding this issue, however none of the solutions have appeared to work. I have tried to clear the gems and re bundle, e.g. gemset empty, bundle install.
The interesting this about this is running rails server is ok, and running fusion-passenger stand alone is fine too, only when running under nginx do I have this issue.
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
Web application could not be started
An error occurred while starting up the preloader. It exited before signalling successful startup back to Phusion Passenger. Please read this article for more information about this problem.
Raw process output:
/usr/local/rvm/gems/ruby-2.0.0-p481/gems/json-1.8.1/lib/json/common.rb:67: [BUG] Segmentation fault
ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
I found the issue and resolved it. ngnix was defaulting to ruby 1.9.3, a version fusion passenger has installed. I only installed one version 2.0.0 of ruby through rvm. All i had to do was set the nginx config file to the ruby wrapper and all was good. The world is once again a happy place!
passenger_ruby /usr/local/rvm/wrappers/ruby-2.0.0-p481/ruby;

Rails 3 continues to use ruby 1.8.7 even though "ruby -v" states 1.9.2

I have finished developing my app and am currently deploying it. I'm getting a weird error from one of my controllers:
syntax error, unexpected ':', expecting ')'
When I run it in my dev environment it works fine. The only difference I can see between dev/prod is that dev is is using Ruby 1.9.2 and Prod is using 1.8.7. In my naivete I thought "Oh I'll just upgrade to 1.9.2" - what I fool I've been. I used RVM, changed my path, started new terminal session and now can see ruby is at 1.9.2:
ruby -v
ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]
which ruby
/usr/local/rvm/rubies/ruby-1.9.2-p290/bin/ruby
However, when I run a "rails s" my computer continues to use 1.8.7:
[2011-10-05 05:58:40] INFO WEBrick 1.3.1
[2011-10-05 05:58:40] INFO ruby 1.8.7 (2010-08-16) [x86_64-linux]
[2011-10-05 05:58:45] INFO WEBrick::HTTPServer#start: pid=32574 port=3000
What the what!!!? I hope someone can help me. I'm about 15 minutes away from moving to the country, and become a farmer!
Thanks in advance.
if you used sudo when installed it might be the reason
sudo passenger-install-apache2-module
uses system ruby. Try
passenger-install-apache2-module
which should produce proper config files.
Have you tried rvm reload ? sometimes when I get strange errors like that reloading rvm fixes it.

Resources