rails-2.3.5和rack-1.0.1的来源在哪里?(Where are the sources for rails-2.3.5 and rack-1.0.1?)
我正在尝试升级需要rails-2.3.5的rails应用程序,而这似乎需要rack-1.0.1。 以下各项的许多(很多!)尝试都没有奏效:
# gem install rails -v=2.3.5 ERROR: could not find gem rails locally or in a repository
要么
# gem install rails -v=2.3.5 --source http://gems.rubyforge.org WARNING: RubyGems 1.2+ index not found for: http://gems.rubyforge.org/ RubyGems will revert to legacy indexes degrading performance. Bulk updating Gem source index for: http://gems.rubyforge.org/ ERROR: While executing gem ... (Gem::RemoteSourceException) Error fetching remote gem cache: SocketError: getaddrinfo: Name or service not known (http://gems.rubyforge.org/yaml)
或者用http://gems.rubyonrails.org代替。 当我尝试http://gems.github.org时,我收到索引错误。
简单地尝试
gems update rails
成功作为命令,但它安装版本2.3.3。为什么这些都不起作用?
以供参考:
# cat /root/.gemrc --- :benchmark: false :verbose: true :update_sources: true :sources: - http://gems.rubyonrails.org - http://gems.opscode.com :bulk_threshold: 1000 :backtrace: false
(安装程序真的是版本2吗?)
I'm trying to upgrade a rails application which requires rails-2.3.5 which in turn seems to require rack-1.0.1. Many (many!) attempts of each of the following hasn't worked:
# gem install rails -v=2.3.5 ERROR: could not find gem rails locally or in a repository
or
# gem install rails -v=2.3.5 --source http://gems.rubyforge.org WARNING: RubyGems 1.2+ index not found for: http://gems.rubyforge.org/ RubyGems will revert to legacy indexes degrading performance. Bulk updating Gem source index for: http://gems.rubyforge.org/ ERROR: While executing gem ... (Gem::RemoteSourceException) Error fetching remote gem cache: SocketError: getaddrinfo: Name or service not known (http://gems.rubyforge.org/yaml)
or substituting http://gems.rubyonrails.org. When I tried http://gems.github.org I get an index error.
Simply trying a
gems update rails
succeeds as a command, but it installs version 2.3.3.Why would any of this not be working?
For reference:
# cat /root/.gemrc --- :benchmark: false :verbose: true :update_sources: true :sources: - http://gems.rubyonrails.org - http://gems.opscode.com :bulk_threshold: 1000 :backtrace: false
(Is the installer really at version 2?)
最满意答案
我两(2)小时后回来了:
# gem install rails -v=2.3.5 --source http://gems.rubyforge.org Successfully installed activesupport-2.3.5 Successfully installed activerecord-2.3.5 Successfully installed rack-1.0.1 Successfully installed actionpack-2.3.5 Successfully installed actionmailer-2.3.5 Successfully installed activeresource-2.3.5 Successfully installed rails-2.3.5 7 gems installed ...
有效。
真的很奇怪。 如果错误消息可以提供更多信息,那将是很好的。
I came back two (2) hours later and:
# gem install rails -v=2.3.5 --source http://gems.rubyforge.org Successfully installed activesupport-2.3.5 Successfully installed activerecord-2.3.5 Successfully installed rack-1.0.1 Successfully installed actionpack-2.3.5 Successfully installed actionmailer-2.3.5 Successfully installed activeresource-2.3.5 Successfully installed rails-2.3.5 7 gems installed ...
It worked.
Truly weird. It would be nice if the error messages could be a little more informative.
相关问答
更多-
您几乎总是希望将应用程序依赖的宝石解包到vendor文件夹中。 你可以用这个rake命令来做到这一点: rake gems:unpack:dependencies 这将在您的应用程序的根文件夹下创建一个文件夹vendor/gems ,并将您使用config.gem命令声明的所有宝石解压到其中。 这不仅可以解决您的rack版本不匹配问题,还可以确保您在开发过程中使用的是完全相同的生产宝石版本,这可以避免将来发生许多潜在的麻烦。 You will almost always want to unpack th ...
-
sudo gem install -v 1.0.1 rack sudo gem install -v 1.0.1 rack
-
您可能需要更改您的设计版本,因为这是从主分支获取的。 尝试: gem 'devise', '1.0.7' You probably need to change your devise version, since this fetches from the master branch. Try: gem 'devise', '1.0.7'
-
将Gemfile升级到Bundler 0.9并添加pg gem。 很简单。 It turns out this is a bug because of different versions of bundler running on heroku and my machine. I've switched to using the .gems dependency file and everything seems to be working.
-
它看起来很好,只是将一个属性命名为“类”似乎不是一个好主意,通常它非常保留字... it looks fine, just naming an attribute as "class" does not seem to be a good idea, it's usually pretty much reserved word...
-
我两(2)小时后回来了: # gem install rails -v=2.3.5 --source http://gems.rubyforge.org Successfully installed activesupport-2.3.5 Successfully installed activerecord-2.3.5 Successfully installed rack-1.0.1 Successfully installed actionpack-2.3.5 Successfully install ...
-
当您使用>=为gem指定版本号时,无论是否已满足相关性,Rubygems将始终尝试获取该gem的最新和最佳版本。 这不是错误,而是预期的行为。 要解决这个问题,gem作者应该通过这样做指定gem依赖于任何版本的Rails 2: s.add_dependency 'rails', '~> 2' 总之,这是宝马作者的错,而不是Rubygems。 When you specify a version number using >= for a gem, Rubygems will always try to g ...
-
我得到了这个工作! 使用这个版本: https : //github.com/blackwinter/wirble.git ,它的工作原理! 希望有所帮助! 约翰 I got this to work! Used this version: https://github.com/blackwinter/wirble.git and it worked! Hope that helps! John
-
看起来有些东西正在存储会话中的长网址 - 可能是清除? - 这就是造成你的问题。 Looks like something is storing the long url in the session - possible Clearance? - and that is causing your problem.
-
Rails rack 1.0错误(Rails rack 1.0 error)[2022-03-30]
您安装了Rack 1.1.0,所需版本是1.0.x. $ gem uninstall rack $ gem install rack -v 1.0.1 You installed Rack 1.1.0, the version required is 1.0.x. $ gem uninstall rack $ gem install rack -v 1.0.1