I'm using ntlm-http gem to verify Windows authentication. This works fine when I run in my test Ruby code, but when I implement it using Cucumber it complains of:
cannot load such file -- ntlm/http (LoadError)
Can any one help me with this please?
Try the following:
require 'net/ntlm_http'
Worked for me!
Related
I am trying to create aws pipeline on vm for which i am using ruby1..3 and rubygems 2.0.3.While trying to create pipeline I am getting following error.
./aws/core/client.rb:14:in `require': no such file to load -- rubygems (LoadError)
Please help me with this problem....
It seems like you are having problems with your ruby/gem installation.
Maybe you have 2 ruby version installed simultaneously on the same machine?
Although not exactly the same question, but it seems that you can try the solutions described in this stackoverflow thread.
I am attempting to make a custom test runner using test/unit in ruby
and have followed a tutorial outlined here
http://endofline.wordpress.com/2008/02/11/a-custom-testrunner-to-scratch-an-itch/
however when i try to run on it using the
ruby -rfast_fail_runner example_test.rb --runner fastfail
however i get the error
C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- fast_fail_runner (LoadError)
from C:/Ruby200/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
You have a file in the current directory named fast_fail_runner.rb, right? Ruby is not finding it. You are following a very old tutorial and I suspect that old versions of Ruby had the current directory (.) on the load path or something like that.
Try replacing -rfast_fail_runner with -r./fast_fail_runner.
I am trying to use Selenium with Ruby. I am new to Ruby, I set it up using this blog http://testnerdy.blogspot.ca/2009/10/installing-ruby-and-selenium-on-windows.html
and the Ruby script I used is from here - http://testnerdy.blogspot.ca/2009/10/running-selenium-tests-written-in-ruby.html
When I ran the script, I get this error
SeleniumRubyWindowsTest.rb:1:in `require': no such file to load -- selenium/client (LoadError)
from SeleniumRubyWindowsTest.rb:1
Any ideas on what I may be doing wrong?
Have you installed the selenium gem? If so, depending on your version of ruby you may need to do a
require 'rubygems'
as the first line of the script to pull in all the gem dependencies, which selenium could be one.
I hope you can help me.
I am working on a small Sinatra Rails application. I have Ruby installed on Mac OSX using RVM (currently using ruby 1.9.2)
I changed my app to include some new gems and to use bundler/setup but I receive the following error when I start the server:
/Users/Matt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- bundler/setup (LoadError)
from /Users/Matt/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from application.rb:2:in `<main>'
I am fairly sure I have something going wrong here, I'm just not sure what or how to fix it.
Running the which commands receives the following output:
which ruby: /Users/Matt/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
which bundle: /Users/Matt/.rvm/gems/ruby-1.9.2-p290/bin/bundle
which gem: /Users/Matt/.rvm/rubies/ruby-1.9.2-p290/bin/gem
Please can someone help me as this is starting to drive me a little crazy.
Many thanks in advance for your help.
from the #stephenmurdoch's comment above:
try running gem install bundler followed by bundle install from inside your application.
I'm trying to add a new gateway to the active_merchant gem and I'm having 'require' issues when I try to run it from source.
(I think my problem is not active_merchant-specific, but more of a general Ruby environment issue, so I dont think the specific gem in use has to do with it.)
This is what I've done:
Cloned the Git repo for AM, to my local directory "C:\Users\jb\Documents\Aptana Studio 3 Workspace\active_merchant"
Went about doing the changes in the "billing/gateways" directory (this is just background info..)
Copied the "Sample Usage" example on AM's Git repo to C:\Users\jb\Documents\Aptana Studio 3 Workspace\simple_gw_test.rb, which starts with:
require 'rubygems'
require 'active_merchant'
Ran "ruby simple_gw_test.rb" and got the error message:
<internal:lib/rubygems/custom_require>:29:in `require': no such file to load --
active_merchant (LoadError)
from <internal:lib/rubygems/custom_require>:29:in 'require'
from simple_gw_test.rb:3:in '<main>'
This is understandable, since I don't have active_merchant gem installed
However, I want to use the downloaded source in the sample file, since I'm modifying the gateway source continually.
I tried
require '/Users/jb/Documents/Aptana Studio 3 Workspace/active_merchant'
And then got the same error:
<internal:lib/rubygems/custom_require>:29:in require': no such file to load --
/Users/jb/Documents/Aptana Studio 3 Workspace/active_merchant (LoadError)
from <internal:lib/rubygems/custom_require>:29:inrequire'
from simple_gw_test.rb:2:in `<main>';
Any Ruby Guru who can shed some light greatly appreaciated!
--jb
PS: I'm using MRI 1.9.2 on Windows 7 x64.
Make sure you have read access to that file. Ruby has given me that error before when I didn't have correct permissions.
I guess I scratched my own itch: After a couple of hours of "Pickaxe book-ing" and googling, I got the code necessary to bootstap the gem without it being installed:
require_relative 'active_merchant/lib/active_merchant'