running 2 separate ruby commands creates 2 separate processes

either put the code into a file and run the file

or put both requires in a single -e parameter


On Fri, Jan 25, 2013 at 10:14 AM, Martin Kociman <[email protected]>wrote:

> Hi!
>
> I have the next problem: I was install a gem. The gem work well in
> 'irb', but doesn't work in console. What is the problem? Please, help!
>
> Now, I print my 'step by step':
> a.
> root@iway-cacique:~# gem install selenium-webdriver
> Successfully installed multi_json-1.5.0
> Successfully installed rubyzip-0.9.9
> Successfully installed ffi-1.3.1
> Successfully installed childprocess-0.3.7
> Successfully installed websocket-1.0.6
> Successfully installed selenium-webdriver-2.29.0
> 6 gems installed
>
> b.
> root@iway-cacique:~# irb
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> require 'selenium-webdriver'
> => true
>
> c.
> root@iway-cacique:~# ruby -e 'require "rubygems"'
> root@iway-cacique:~# ruby -e 'require "selenium-webdriver"'
> -e:1:in `require': no such file to load -- selenium-webdriver
> (LoadError)
>         from -e:1
>
> ########################
> #Additional Information#
> ########################
>
> root@iway-cacique:~# irb
> irb(main):001:0> require 'rubygems'
> => true
> irb(main):002:0> Gem.path
> => ["/usr/lib/ruby/gems/1.8", "/root/.gem/ruby/1.8"]
> ------------------------
>
> root@iway-cacique:~# gem which 'selenium-webdriver'
>
> /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.29.0/lib/selenium-webdriver.rb
> ------------------------
>
> root@iway-cacique:~# bundle show selenium-webdriver
> /usr/lib/ruby/gems/1.8/gems/selenium-webdriver-2.29.0
> ------------------------
>
> root@iway-cacique:~# ruby --version
> ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
> ------------------------
>
> root@iway-cacique:~# rails --version
> Rails 2.3.9
> ------------------------
>
> root@iway-cacique:~# gem env
> RubyGems Environment:
>   - RUBYGEMS VERSION: 1.8.25
>   - RUBY VERSION: 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
>   - INSTALLATION DIRECTORY: /usr/lib/ruby/gems/1.8
>   - RUBY EXECUTABLE: /usr/bin/ruby1.8
>   - EXECUTABLE DIRECTORY: /usr/bin
>   - RUBYGEMS PLATFORMS:
>     - ruby
>     - x86-linux
>   - GEM PATHS:
>      - /usr/lib/ruby/gems/1.8
>      - /root/.gem/ruby/1.8
>   - GEM CONFIGURATION:
>      - :update_sources => true
>      - :verbose => true
>      - :benchmark => false
>      - :backtrace => false
>      - :bulk_threshold => 1000
>   - REMOTE SOURCES:
>      - http://rubygems.org/
>
> --
> Posted via http://www.ruby-forum.com/.
>
>

-- 
[email protected] | 
https://groups.google.com/d/forum/ruby-talk-google?hl=en


Reply via email to