尝试执行 Rails-V 时出现 Rails 问题

发布于 2024-09-15 12:35:04 字数 3650 浏览 4 评论 0原文

我的朋友刚刚向我分享了这个新应用程序,我从 heroku 中提取了它,

我只是想执行 Rails -v 操作,然后我得到了

denniss$ rails -v
/Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:132:in `block in resolve': Could not find gem 'selenium-webdriver', required by 'capybara', in any of the sources (Bundler::VersionConflict)
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in `catch'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in `resolve'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:153:in `resolve'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:93:in `specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:137:in `specs_for'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:126:in `requested_specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/environment.rb:23:in `requested_specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:11:in `setup'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler.rb:95:in `setup'
 from /Users/denniss/Sites/mogo-production/config/boot.rb:5:in `<top (required)>'
 from script/rails:8:in `require'
 from script/rails:8:in `<main>'

编辑: 我做了“捆绑检查”,我得到了这个

/Library/Ruby/Site/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
    from /Library/Ruby/Site/1.8/rubygems.rb:214:in `activate'
    from /Library/Ruby/Site/1.8/rubygems.rb:1082:in `gem'
    from /usr/bin/bundle:18

Edit2:

好的,成功安装 rmagick 后我发现的最新错误是这个。我能够执行 rake db:create 和迁移。我尝试做 Rails 服务器(使用 Rails3),但收到此错误

/Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing': uninitialized constant ActiveSupport::CoreExtensions (NameError)
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/facebooker-1.0.74/lib/facebooker/adapters/adapter_base.rb:6
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/facebooker-1.0.74/lib/facebooker.rb:259
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `each'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `each'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler.rb:107:in `require'
from /Users/denniss/Sites/mogo-production/config/application.rb:5
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:28:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:28
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:27:in `tap'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:27
from script/rails:9:in `require'
from script/rails:9

My friend just shared me this new application and I pulled it from heroku

I was just trying to do rails -v and I got

denniss$ rails -v
/Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:132:in `block in resolve': Could not find gem 'selenium-webdriver', required by 'capybara', in any of the sources (Bundler::VersionConflict)
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in `catch'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/resolver.rb:130:in `resolve'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:153:in `resolve'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:93:in `specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:137:in `specs_for'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/definition.rb:126:in `requested_specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/environment.rb:23:in `requested_specs'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:11:in `setup'
 from /Users/denniss/.rvm/gems/ruby-1.9.2-rc2/gems/bundler-1.0.0.rc.5/lib/bundler.rb:95:in `setup'
 from /Users/denniss/Sites/mogo-production/config/boot.rb:5:in `<top (required)>'
 from script/rails:8:in `require'
 from script/rails:8:in `<main>'

Edit:
I did "bundle check" and I got this

/Library/Ruby/Site/1.8/rubygems.rb:779:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError)
    from /Library/Ruby/Site/1.8/rubygems.rb:214:in `activate'
    from /Library/Ruby/Site/1.8/rubygems.rb:1082:in `gem'
    from /usr/bin/bundle:18

Edit2:

Okay, the most up to date error that I gate after successfully installing rmagick is this. I was able to do rake db:create and migrate. I tried to do rails server (using rails3) and I get this error

/Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/aws-s3-0.6.2/lib/aws/s3/extensions.rb:206:in `const_missing': uninitialized constant ActiveSupport::CoreExtensions (NameError)
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/facebooker-1.0.74/lib/facebooker/adapters/adapter_base.rb:6
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/facebooker-1.0.74/lib/facebooker.rb:259
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:64:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `each'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:62:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `each'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler/runtime.rb:51:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/bundler-1.0.0.rc.5/lib/bundler.rb:107:in `require'
from /Users/denniss/Sites/mogo-production/config/application.rb:5
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:28:in `require'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:28
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:27:in `tap'
from /Users/denniss/.rvm/gems/ree-1.8.7-2010.02/gems/railties-3.0.0.rc/lib/rails/commands.rb:27
from script/rails:9:in `require'
from script/rails:9

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情话难免假 2024-09-22 12:35:04

该应用程序需要一个未安装的 gem,在本例中为“selenium-webdriver”。尝试捆绑检查以查看是否存在其他错误,然后继续安装您缺少的 gem。

根据评论进行编辑:

在第一个代码块中,您使用 MRI 1.9,然后转到 MRI 1.8,现在突然使用 REE。这告诉我,您的计算机上(至少)有三种不同的 Ruby 解释器,这并没有让您的生活变得更轻松。很有可能,你到处都有宝石。您以前有使用 RVM 的经验吗?如果没有,我的建议是删除 RVM,坚持使用一个 Rails 解释器(系统默认值,MRI 1.8)并从那里开始。

The application requires a gem that isn't installed, in this case "selenium-webdriver." Try bundle check to see if there are additional errors, then proceed to install the gems you're missing.

Edit from comments:

In your first code block you're using MRI 1.9, then you moved on to MRI 1.8 and now you're suddenly using REE. That tells me that you've got (at least) three different Ruby interpreters on your computer, which isn't making your life easier. In all likelyhood, you've got gems all over the place as well. Do you have previous experience with RVM? If not, my suggestion would be to remove RVM, stick with one Rails interpreter (system default, MRI 1.8) and go from there.

卷耳 2024-09-22 12:35:04

安装 rmagick 几乎是 Rails 开发人员的必经之路。一开始很可怕,但最终并没有那么复杂。 gem 在本机编译期间真正希望看到的是 ImageMagick 的安装。

在 Linux 上,无论使用什么包管理器,我通常都很幸运。例如,sudo apt-get install imagemagick

如果您使用的是 OS X,则需要做更多的工作。我曾多次使用 port,最近使用 brew 来安装 ImageMagick。如果您使用的是 OS X,请前往 Google 并搜索您正在使用的任何包管理系统的说明。

Installing rmagick is nearly a rite of passage for Rails developers. It's horrifying at first, but ultimately not that complicated. What the gem really wants to see during native compilation is an install of ImageMagick.

On Linux, I've usually had good luck with whatever package manager is in use. sudo apt-get install imagemagick for example.

If you are on OS X, then it's a bit more work. I've used port several times, and most recently brew to install ImageMagick. If you're on OS X, then head for Google and search for instructions with whatever package management system you happen to be using.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文