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)>'
Related
I'am trying to use vagrant to start a Hours dev environment
I have gotten everything to be setup whitout errors.
The thing is that when i try to access the server through POW i get this error.
LoadError: cannot load such file -- bundler/setup
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
~/Desktop/1dv032/ex1/hours/Hours/config/boot.rb:4:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
I can't figure out why.
Ruby -v gives
2.3.1
I just installed the libtcod ruby gem, and i wanted to see if the demo works. When I start the demo, it gives me an error:
C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.9.8-x64-mingw32/lib/ffi/library.rb:133:in `block in ffi_lib': Coul (LoadError)ibrary 'libtcod-mingw': The specified module could not be found.
.
Could not open library 'libtcod-mingw.dll': The specified module could not be found.
.
Could not open library 'C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/clib/i686/libtcod-mingw.dll': The specified moR♀)
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.9.8-x64-mingw32/lib/ffi/library.rb:100:in `map'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/ffi-1.9.8-x64-mingw32/lib/ffi/library.rb:100:in `ffi_lib'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/lib/libtcod/bindings.rb:23:in `<module:TCOD>'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/lib/libtcod/bindings.rb:3:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from C:/Ruby21-x64/lib/ruby/gems/2.1.0/gems/libtcod-0.1.1/lib/libtcod.rb:5:in `<top (required)>'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:135:in `rescue in require'
from C:/Ruby21-x64/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:144:in `require'
from C:/Users/<some user>/Desktop/libtcod.rb:1:in `<main>'
Had the same problem trying to get the example code to work.
I fixed it by just dragging the libtcod-mingw.dll and SDL.dll into the project directory.
I am creating
bundler gem --test=rspec MyGem.
in which I'm getting the repository structure.
When I try to run the rspec code I get the following error:
`require': cannot load such file -- spec_helper (LoadError)
I then try to apply require relative but I still get an error:
sheetal#ubuntu:~/sheetal/spec$ rspec sheetal_spec.rb
\/home/sheetal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load such file -- spec_helper (LoadError)
from /home/sheetal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/sheetal/sheetal/spec/sheetal_spec.rb:1:in `<top (required)>'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `load'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `block in load_spec_files'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `each'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `load_spec_files'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:96:in `setup'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:84:in `run'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:69:in `run'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:37:in `invoke'
from /home/sheetal/.rvm/gems/ruby-2.2.0/gems/rspec-core-3.1.7/exe/rspec:4:in `<top (required)>'
from /home/sheetal/.rvm/gems/ruby-2.2.0/bin/rspec:23:in `load'
from /home/sheetal/.rvm/gems/ruby-2.2.0/bin/rspec:23:in `<main>'
from /home/sheetal/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `eval'
from /home/sheetal/.rvm/gems/ruby-2.2.0/bin/ruby_executable_hooks:15:in `<main>'
You're running the specs from the spec folder. This messes up the load path. Run specs from the root of your project: ~/sheetal.
rspec spec/sheetal_spec.rb
Rspec adds the spec and lib folders to the load path automatically. If you're already in the spec folder, rspec is going to add spec/spec to the load path instead.
Assuming that you have your code in the lib folder, you would have to add both . and ../lib to the load path if you want to run your tests in the spec folder.
I am new to Sinatra and I am trying to make a database using SQLite3 and Datamapper. I installed both gems and also the adaptor and then tried to execute this code in a file:
#config
require 'sinatra'
require 'sinatra/contrib' if development?
require 'data_mapper'
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/recall.db")
DataMapper.finalize.auto_upgrade!
The command line gave me this error when I executed the file:
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require':126: The specified module could not be found. -
C:/Ruby193/lib/ruby/gems/1.9.1/gems/do_sqlite3-0.10.10-x86-mingw32/lib/do_sqlite3/1.9/do_sqlite3.so (LoadError)
and then a lot of other things which went wrong because of these errors.
I tried reinstalling many of the gems but nothing seems to have worked.
EDIT: The full error code was this:
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require':126: The specified module could not be found. - C:/Ruby193/lib/ruby/gems/1.9.1/gems/do_sqlite3-0.10.10-x86-mingw32/lib/do_sqlite3/1.9/do_sqlite3.so (LoadError)
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/backports-2.6.5/lib/backports/tools.rb:314:in `require_with_backports'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/do_sqlite3-0.10.10-x86-mingw32/lib/do_sqlite3.rb:31:in `rescue in <top (required)>'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/do_sqlite3-0.10.10-x86-mingw32/lib/do_sqlite3.rb:26:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/backports-2.6.5/lib/backports/tools.rb:314:in `require_with_backports'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/dm-sqlite-adapter-1.2.0/lib/dm-sqlite-adapter/adapter.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/backports-2.6.5/lib/backports/tools.rb:314:in `require_with_backports'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/dm-sqlite-adapter-1.2.0/lib/dm-sqlite-adapter.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:60:in `rescue in require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:35:in `require'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/backports-2.6.5/lib/backports/tools.rb:314:in `require_with_backports'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:163:in `load_adapter'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:133:in `adapter_class'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core/adapters.rb:13:in `new'
from C:/Ruby193/lib/ruby/gems/1.9.1/gems/dm-core-1.2.0/lib/dm-core.rb:230:in `setup'
from test.rb:7:in `<main>'
I had this problem, using ruby 1.9.3 on windows - fixed it by downloading the sqlite3.dll from http://www.sqlite.org/download.html and putting it in C:\Ruby193\bin
Try adding:
require 'dm-sqlite-adapter'
If that doesn't fix things, you could also try changing
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/recall.db")
to
DataMapper.setup(:default, 'sqlite:recall.db')
and see if that fixes it. I really don't know the cause, but doing the above (single quotes, no "3", and no path) fixed an error I was receiving when trying a particular setup.
I am trying to run the wsdl2ruby.rb script that comes with the soap4r gem, and get the following errors:
[ral#lap etc]$ ruby /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/bin/wsdl2ruby.rb
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:68: warning: encoding option is ignored - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:69: warning: encoding option is ignored - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/soap/property.rb:70: warning: encoding option is ignored - u
/usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb:74:in `<top (required)>': XML processor module not found. (RuntimeError)
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/parser.rb:13:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/xmlSchema/importer.rb:11:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/importer.rb:9:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:29:in `require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/wsdl/soap/wsdl2ruby.rb:11:in `<top (required)>'
from <internal:lib/rubygems/custom_require>:33:in `require'
from <internal:lib/rubygems/custom_require>:33:in `rescue in require'
from <internal:lib/rubygems/custom_require>:29:in `require'
from /usr/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/bin/wsdl2ruby.rb:5:in `<main>'
I have the following gems installed:
httpclient (2.2.0.1) minitest (1.6.0)
rake (0.8.7) rdoc (2.5.8) soap4r
(1.5.8)
I have tried to install the xml parser gem which fails with loads of errors: http://pastie.org/1822127
Does anyone know what the problem is? This is my first time touching Ruby.
Is soap4r the best tool for the job for making a SOAP webservice client?
Thanks a lot!
The answer posted at
http://railsforum.com/viewtopic.php?id=41231
worked for me. That is, I edited the file rubyhome/lib/ruby/gems/1.9.1/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb and changed line 66 from:
c.downcase == name
to
c.to_s.downcase == name
and the problem appears to be solved.
You might also try the new official repo on Github that has this fix, and others applied to the master branch. You'll need to set your Gemfile to use the git repo as such:
gem 'soap4r', :git => 'git://github.com/felipec/soap4r.git'