红宝石宝石紫外线,Rails,豹纹

Ruby Gem Ultraviolet, Rails, Leopard

我不能让这种疯狂的依赖工作,请不要告诉我去雪豹,因为我有一个PPC。

我已经安装了Onigurma、textpow和uviolet。我正在使用RVM,这可能是问题所在。不是说房车坏了,只是我不知道怎么走正确的路。

当我启动一个Rails应用程序时,我得到的错误是我缺少了ultravioletgem,这不是真的,因为它在gem list下列出,其他gem工作正常。

如果您需要更多信息和具体信息,请告诉我:

这是我的错误日志:

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:in gem_original_require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
new_constants_in'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/rails/gem_dependency.rb:208:in
load'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in load_gems'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in
each'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in load_gems'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:164:in
process'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in send'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in
run'
/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 gem_original_require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in
new_constants_in'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in 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
gem_original_require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in 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
gem_original_require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/rails/gem_dependency.rb:208:in load'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in
load_gems'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in each'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:307:in
load_gems'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:169:in process'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in
send'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/rails-2.3.5/lib/initializer.rb:113:in run'
/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
gem_original_require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
require'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in new_constants_in'
/Users/samgilman/.rvm/gems/ruby-1.8.7-p302/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in
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 gem_original_require'
/Users/samgilman/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require'
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
Run rake gems:install to install the missing gems.
Macintosh:sam samgilman$


对于轨道3、轨道4和轨道5,您应该有Gemfile

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

在使用gem命令声明宝石之前,宝石不会自动加载。也许它很顽固,所以试试这个:

1
2
3
4
5
6
7
% irb
> require 'rubygems'
 => true
> gem 'ultraviolet'
 => true
> $:.grep(/ultraviolet/)
 => [...]

最后一行应该显示库$:的加载路径已经调整为使用您的rvm管理的gem。它可能丢失或不正确,这将阻止宝石正确加载。

如果您使用的是RVM并且环境不一致,那么通常很容易运行错误的rubyirb。如果你不小心你的路径,gem经常会被绑定到错误的Ruby上。