Ruby Gem Ultraviolet, Rails, Leopard
我不能让这种疯狂的依赖工作,请不要告诉我去雪豹,因为我有一个PPC。
我已经安装了Onigurma、textpow和uviolet。我正在使用RVM,这可能是问题所在。不是说房车坏了,只是我不知道怎么走正确的路。
当我启动一个Rails应用程序时,我得到的错误是我缺少了
如果您需要更多信息和具体信息,请告诉我:
这是我的错误日志:
Macintosh:sam samgilman$ script/server
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
no such file to load -- ultraviolet
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' new_constants_in'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' load'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/rails/gem_dependency.rb:208:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:inload_gems' each'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:inload_gems' process'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:164:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:insend' run'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in
/Users/samgilman/Sites/sam/config/environment.rb:9
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' new_constants_in'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:inrequire' gem_original_require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/commands/server.rb:84
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' gem_original_require'
script/server:3
no such file to load -- ultraviolet
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:innew_constants_in' require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/rails/gem_dependency.rb:208:inload' load_gems'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:ineach' load_gems'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:169:inprocess' send'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:inrun' gem_original_require'
/Users/samgilman/Sites/sam/config/environment.rb:9
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire' require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:innew_constants_in' require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/commands/server.rb:84
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ingem_original_require' require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
script/server:3
Missing these required gems:
ultraviolet
You're running:
ruby 1.8.7.302 at /Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/bin/ruby
rubygems 1.3.7 at /Users/samgilman/.rvm/gems/ruby-1.8.7-p302, /Users/samgilman/.rvm/gems/ruby-1.8.7-p302@global
Runrake gems:install to install the missing gems.
Macintosh:sam samgilman$
号
型
对于轨道3、轨道4和轨道5,您应该有
1 | gem"ultraviolet", :require =>"uv" |
。
型
埃多克斯1〔5〕
1 2 3 | Rails::Initializer.run do |config| config.gem 'ultraviolet', :lib => 'uv' end |
型
安装gem与在Rails配置中声明gem不同,尽管它是一个重要的先决条件。
确保您的config/environment.rb至少设置了:
1 2 3 | Rails::Initializer.run do |config| config.gem 'ultraviolet' end |
在使用
1 2 3 4 5 6 7 | % irb > require 'rubygems' => true > gem 'ultraviolet' => true > $:.grep(/ultraviolet/) => [...] |
号
最后一行应该显示库
如果您使用的是RVM并且环境不一致,那么通常很容易运行错误的