English 中文(简体)
对于铁路而言,如果有一个利用铁路3.0.0的项目,它就将 looks1.0.0,但铁路服务器却能开车吗?
原标题:For Rails, if there is a project that uses Rails 3.0.0, it looks for bundler 1.0.0 and it is there but rails server won t run?

我有一个铁路3.0.0项目,使用Rub1.9.2。 现在,我试图用一台新计算机,使用目前的快车,我要说:

$ rails s
/Users/michael/.rvm/gems/ruby-1.9.2-p318@global/gems/bundler-1.1.3/lib/bundler/resolver.rb:129:in `block in resolve : Bundler could not find compatible versions for gem "bundler": (Bundler::VersionConflict)
  In Gemfile:
    rails (= 3.0.0) ruby depends on
      bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.1.3)

但我已经使用过。

gem install rails -v 3.0.0
gem install bundler -v 1.0.0
gem install bundler -v 1.0.2

因此,在Igem list时,我将看到

bundler (1.1.3, 1.0.22, 1.0.0)
rails (3.0.0)

因此,它如何仍然抱怨铁路3.0.0需要1.000牛奶,没有吗? 如何使该项目再次运行?

最新情况:我的Gemfile主要是评论,但下列情况除外:

source  http://rubygems.org 

gem  rails ,  3.0.0       
gem  sqlite3-ruby , :require =>  sqlite3 

Update 2: if I run bundle check:

$ bundle check
Your Gemfile s dependencies could not be satisfied
Install missing gems with `bundle install`

$ bundle install
Fetching gem metadata from http://rubygems.org/.........
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails (= 3.0.0) ruby depends on
      bundler (~> 1.0.0) ruby

  Current Bundler version:
    bundler (1.1.3)

This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
问题回答

问题是,你有三版(1.1.3, 1.0.22, 1.0.0)。 你们只需要1.0.0。 当你操作服务器时,使用1.1.3。

因此,首先由该指挥官领导两名陪护员。

      gem uninstall bundler -v=1.1.3

      gem uninstall bundler -v=1.0.22

然后运行服务器将确保工作......。

你们可能需要在班子里经营铁路和汽车:

bundle exec rails s

随行指挥,例如,

bundle exec rake -T

这里带有更深入的文章链接的SO thread。 而且,如果你们知道如何绕过它,还有许多聊天。 个人方面,我指我最常用的指挥,因此我甚至没有通知。

仅将Bundler列入gemfile,以锁定供该项目使用的 b本。

gem  bundler ,  1.1.0 

如果你这样做,你就不必揭开其他版本的Bundler,而你可能利用其他有不同受扶养人的项目。

您也不必在任何<条码>铁路/条码>上使用<条码>。 非铁路的指挥需要“不偏袒”。





相关问题
rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

SSL slowness in EC2

We ve deployed our rails app to EC2. In our setup, we have two proxies on small instances behind round-robin DNS. These run nginx load balancers for a dynamically growing and shrinking farm of web ...

Auth-code with A-Za-z0-9 to use in an URL parameter

As part of a web application I need an auth-code to pass as a URL parameter. I am currently using (in Rails) : Digest::SHA1.hexdigest((object_id + rand(255)).to_s) Which provides long strings like : ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

activerecord has_many :through find with one sql call

I have a these 3 models: class User < ActiveRecord::Base has_many :permissions, :dependent => :destroy has_many :roles, :through => :permissions end class Permission < ActiveRecord::...

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

How to get SQL queries for each user where env is production

I’m developing an application dedicated to generate statistical reports, I would like that user after saving their stat report they save sql queries too. To do that I wrote the following module: ...

热门标签