如何为项目设置默认的 rails 版本?

编程入门 行业动态 更新时间:2024-10-26 10:34:21
本文介绍了如何为项目设置默认的 rails 版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我在我的系统 (Fedora) 中安装了两个不同的 Rails 版本.

I have installed two different rails versions in my system (Fedora).

gem list -d rails *** LOCAL GEMS *** rails (3.0.5, 1.2.1) Author: David Heinemeier Hansson Rubyforge: rubyforge/projects/rails Homepage: www.rubyonrails Installed at (3.0.5): /usr/local/lib/ruby/gems/1.8 (1.2.1): /usr/local/lib/ruby/gems/1.8 Full-stack web application framework.

当我尝试按照以下方式创建项目时 ("www.nomachetejuggling/2008/03/12/using-multiple-versions-of-rails/")

When i try to create the project like following way ("www.nomachetejuggling/2008/03/12/using-multiple-versions-of-rails/")

rails 1.2.1 myproject

但是,它不起作用.所以,我检查了

But, it's not working. So, i checked

rails -v Rails 3.0.5

那么,你能帮我看看如何用旧版本和新版本创建项目吗?有没有办法将特定的 Rails 版本设置为默认版本?

So, can you help me, how to create the project with older version and newer version. Is there any way to set the particular rails version as default?

推荐答案

要使用比您安装的最新版本旧的版本,只需将版本号用下划线括起来:

To use an older version than the latest you have installed, just wrap the version number in underscores:

rails _1.2.1_ myproject

更多推荐

如何为项目设置默认的 rails 版本?

本文发布于:2023-10-20 01:11:43,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1509385.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:何为   版本   项目   rails

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!