English 中文(简体)
创建宝石集时,我真的需要@rails3吗?
原标题:Do I really need the @rails3 when creating a gemset?

我很困惑,@rails3在创建新宝石集时会做什么?

我想同时运行rail2.1.1和rails3应用程序,并在两者之间切换。

我为1.9.2和1.8.7创建了一个rvm

在1.9.2中,我创建了两个宝石集,并在一个宝石集中安装了轨道2.1.1,在另一个宝石集中安装了轨道3。

我这样做对吗?

我读到其他人在gemset创建过程中使用@rails3,它有助于隔离事物??我不明白,有人能解释一下吗。

我应该删除宝石并重新开始吗?还是我必须删除更高的部分?

问题回答

有红宝石和宝石。1.9.2和1.8.7是你的红宝石。每个ruby版本都可以有许多gemset(每个gemset都绑定到rvm上的一个ruby安装)。就我个人而言,我为每个新项目创建了一个新的宝石集,以帮助将该项目所需的宝石与任何其他项目隔离开来。

rails是一个宝石,所以通常建议将它和它所依赖的所有宝石隔离到一个宝石集中。

否则,您也可以使用

rails _2.1.1_ -v

调用rails 2.1.1,尽管通常的建议是创建单独的gemset。您可以通过rvm-inforvm-list-gemsets查看宝石的许多信息。每个宝石都是一个单独的文件夹,可以很好地将事物相互隔离。





相关问题
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: ...

热门标签