I seem to have correct include path, but a lot of gems can't be loaded
via "required". What could be the problem?
#!/usr/bin/ruby -w
require "cgi" # cant load this
require "actionpack" # can not load this
# /var/www/ruby/test.rb
/var/www/ruby/test.rb:3:in `require': no such file to load --
/var/lib/gems/1.9.2/gems/passenger-3.0.11/test/stub/vendor_rails/minimal/actionpack
(LoadError)
from /var/www/ruby/test.rb:3:in `<main>'
# gem list -d actionpack
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in `<top
(required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
Web-flow and rendering framework putting the VC in MVC (part of
Rails).
# gem list -d action_pack
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in `<top
(required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
# gem list -d actionpack
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in `<top
(required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
Web-flow and rendering framework putting the VC in MVC (part of
Rails).
# gem list -d action_pack
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in `<top
(required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
Hi Alex,
changing it to require 'action_pack' worked.
But other gems has the same issue -
# ./test.rb
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require': cannot load such file -- bundler (LoadError)
from
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in
`require'
from ./test.rb:8:in `<main>'
# gem list -d bundler
/usr/local/rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/yaml.rb:56:in `<top
(required)>':
It seems your ruby installation is missing psych (for YAML output).
To eliminate this warning, please install libyaml and reinstall your
ruby.
I was able to solve the issue. Don't know what was wrong, but I removed
ruby, gems, rails, rvm completely from the machine. Rebooted and
installed everything freshly. That worked, now no more errors in loading
any gem.