I have an error while running ruby server (RMX-OS) - ruby

i have this error when i launch RMX-OS.rb
root#Pokemon-Paradiz:~/RMX-OS# ruby RMX-OS.rb
/usr/local/rvm/rubies/ruby-2.0.0-p648/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in require': /root/RMX-OS/bin/2.0/mysql_api.so: invalid ELF header - /root/RMX-OS/bin/2.0/mysql_api.so (LoadError) from /usr/local/rvm/rubies/ruby-2.0.0-p648/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:54:in require'
from RMX-OS.rb:72:in `'
please help me ,
Thanks

Related

Ruby spreadsheet load error. Why I am getting this error?

I have spreadsheet gem installed. Also configured in the gem file.
When I am executing the test i am getting the following error:
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/spreadsheet-0.9.3/lib/spreadsheet/excel/reader.rb:6:in require': cannot load such file -- spreadsheet/noteObject (LoadError) from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/spreadsheet-0.9.3/lib/spreadsheet/excel/reader.rb:6:in <top (required)>'
from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/spreadsheet-0.9.3/lib/spreadsheet.rb:28:in require' from C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/spreadsheet-0.9.3/lib/spreadsheet.rb:28:in <top (required)>'

How do I fix a ffi_c (LoadError) given by line 127 of kernel_require.rb (I'm using Ruby 2.3 on Windows 10)

Whenever I try to run my Ruby program I get this error:
C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require': cannot load such file -- ffi_c (LoadError)
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:inrescue in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:6:inrescue in '
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/ffi-1.9.10-x64-mingw32/lib/ffi.rb:3:in <top (required)>'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient/windows/root_certs.rb:2:in'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient/windows.rb:7:in require_relative'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient/windows.rb:7:in'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/restclient.rb:16:in <top (required)>'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:inrequire'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:120:in require'
from C:/Ruby23-x64/lib/ruby/gems/2.3.0/gems/rest-client-1.8.0-x64-mingw32/lib/rest_client.rb:2:in'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:inrescue in require'
from C:/Ruby23-x64/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from form_response_transfer.rb:3:in [main method]
The program (form_response_transfer.rb) used to work fine, but now, there seems to be some problem with my rest-client gem. I haven't changed any of the code in the program since it last worked, so I'm not sure exactly what I did to cause this error. In general, gems that end with X64-mingw32 have been giving me problems lately (some other examples include nokogiri, sqlite3, and pg). How should I go about trying to fix this error? Could there be some problem with how Ruby is set up on my computer?
Try to uninstall FFI gem
gem uninstall ffi
and then reinstall it with below command:
gem install ffi --platform=ruby
It worked on my side (Win7 x64)

cannot load such file -- foreman/cli (LoadError)

I got one error message while running following command.I use Proxy.is this a problem with proxy?please help me.Thanks in advance.
C:\Users\rajitha\java-getting-started>foreman
C:/Heroku/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `
require': cannot load such file -- foreman/cli (LoadError)
from C:/Heroku/ruby-1.9.3/lib/ruby/site_ruby/1.9.1/rubygems/custom_requi
re.rb:36:in `require'
from C:/Heroku/bin/foreman:8:in `<main>'
use heroku local instead. It's the replacement for foreman.

Trouble running p1pp - GLI.run no longer works for GLI-2

I am new to ruby, wanted to try out the ProcessOne's Push Platform (p1pp)
I've downloaded the source for p1pp (from https://github.com/processone/p1pp), tried running it in Ubuntu 12.04.
$./bin/p1.rb
Got the error:
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- gli (LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from ./bin/p1.rb:16
installed gli using the command
gem install gli
This time I got
/usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require': no such file to load -- blather/client/dsl (LoadError)
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from /home/krishna/PubSub/p1pp-master/lib/p1pp/p1_publisher.rb:2
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from ./bin/p1.rb:18
Installed blather:
gem install blather
Now I am stuck here:
You should include GLI::App instead
GLI.run no longer works for GLI-2, you must just call `run(ARGV)' instead
either fix your app, or use the latest GLI in the 1.x family
Any help would be appreciated. Thanks!
Found the solution myself!
include GLI::App instead of GLI and change "exit GLI.run(ARGV)" in the last line to "exit run(ARGV)
Found this info here:
[1] http://forums.pragprog.com/forums/200/topics/10975
[2] https://github.com/bencevans/hnews/issues/3

Trying to Run Ruby script in terminal but get ERROR

I am trying to run a ruby script to rename some files but I get the following error:
Eccleshall$ ruby rename.rb
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load -- ftools (LoadError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from rename.rb:45:in `<main>'
Thanks for the help.
Change to script to say:
require "fileutils"
instead of
require "ftools"
ftools has been deprecated.

Resources