basic 'ruby setup.rb --help' failed

Grace Lee's Avatar

Grace Lee

12 Mar, 2012 06:59 PM

Hi,
I'm new to ruby and tried to install rubygems to local path and got errors with basic --help option. Did I miss anything in the command?
Here is the scenerio:
-> (export GEM_HOME=/tools/x3/current/ruby-1.9.2-p180/lib/ruby; ruby setup.rb --help) /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/psych_tree.rb:3:in `<module:Gem>': uninitialized constant Psych::Visitors (NameError)

    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/psych_tree.rb:1:in `<top (required)>'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/custom_require.rb:36:in `require'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/custom_require.rb:36:in `require'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems.rb:667:in `load_yaml'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/config_file.rb:235:in `load_file'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/config_file.rb:178:in `initialize'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/gem_runner.rb:78:in `new'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/gem_runner.rb:78:in `do_configuration'
    from /export/home/xtools/ruby/rubygems-1.8.18/lib/rubygems/gem_runner.rb:51:in `run'
    from setup.rb:38:in `<main>'

-> ruby --version ruby 1.9.2p180 (2011-02-18 revision 30909) [i686-linux]
-> which ruby /tools/x3/current/bin/ruby

Any help would be greatly appreciated.

  1. Support Staff 1 Posted by Eric Hodel on 12 Mar, 2012 09:49 PM

    Eric Hodel's Avatar

    Did you have libyaml installed when you built ruby? What does ruby -rpsych -e0 say?

    Also, your GEM_HOME is very odd, it should be /tools/x3/current/ruby-1.9.2-p180/lib/ruby/gems/1.9.1/ if you wish to use the standard gem install location.

  2. 2 Posted by frank on 14 Mar, 2012 09:32 AM

    frank's Avatar

    Hi
    when i run: ruby -rpsych -e0, it said "ruby: no such file to load --psych(LoadError)"

    what's the problem?

  3. 3 Posted by Tim Dorr on 14 Mar, 2012 07:12 PM

    Tim Dorr's Avatar

    You need to reinstall ruby with pysch enabled. Install libyaml first: http://pyyaml.org/wiki/LibYAML Then reinstall (./configure & make clean & make & make install) your copy of Ruby.

  4. Support Staff 4 Posted by Evan Phoenix on 14 Mar, 2012 10:14 PM

    Evan Phoenix's Avatar

    I've just released 1.8.19 which should fix this problem. Please try it out and let me know if your problem has been solved.

    Thanks for your patience.

  5. 5 Posted by Frank Yu S on 15 Mar, 2012 03:14 AM

    Frank Yu S's Avatar

    Thanks for help! However,I have to say, I install it on window 2003 server. And there is no (./configure & make clean & make & make install),the link you gave is for Linux. What can I do?

  6. Support Staff 6 Posted by Evan Phoenix on 15 Mar, 2012 04:34 AM

    Evan Phoenix's Avatar

    I'm unsure how to get libyaml onto windows for ruby to use. But with the fix in 1.8.19, you no longer require psych so you don't need to worry about installing libyaml.

  7. Evan Phoenix closed this discussion on 15 Mar, 2012 04:34 AM.

  8. Luis Lavena re-opened this discussion on 15 Mar, 2012 01:12 PM

  9. Support Staff 7 Posted by Luis Lavena on 15 Mar, 2012 01:12 PM

    Luis Lavena's Avatar

    RubyInstaller already includes psych, so you don't need to install it:

    http://rubyinstaller.org/

  10. 8 Posted by Frank Yu S on 17 Apr, 2012 11:55 AM

    Frank Yu S's Avatar

    Hi sir,

    Sorry for trouble you again~

    I have installed the redmine1.3 on WINDOWS Server. When I run: ruby script/server webrick -e production
    It works well and I can use the redmine, but when I run : ruby script/server webrick -e production -d
    it shows error.
    [cid:[email blocked]]

    And the information about the gem I installed is below:

    [cid:[email blocked]]

    Thanks for your help!!!

    BR/Frank

  11. Support Staff 9 Posted by Luis Lavena on 17 Apr, 2012 11:56 AM

    Luis Lavena's Avatar

    You can't run as daemon on Windows because there is no fork() functionality, as clearly stated by the error message.

    There are plenty of tools to run Rails applications as services, you just need to google for it.

  12. Luis Lavena closed this discussion on 17 Apr, 2012 11:56 AM.

  13. Frank Yu S re-opened this discussion on 17 Apr, 2012 11:58 AM

  14. 10 Posted by Frank Yu S on 17 Apr, 2012 11:58 AM

    Frank Yu S's Avatar

    Ok!

    So many thanks~ I will take a look.

    BR/Frank

  15. Luis Lavena closed this discussion on 15 May, 2012 06:08 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac