一键安装 Ruby/Rails/SQLite?

发布于 2024-07-17 18:49:36 字数 314 浏览 9 评论 0原文

我习惯了 MAMP 的一键安装本地环境。 是否有 Ruby 等效项...您可以下载并立即获得本地运行的最新版本的 Ruby、Rails、SQLite?

我使用的是 Mac,运行 Leopard,并且知道所有上述技术都随 Leopard 一起提供(也许 SQLite 除外)。 我引用了较新版本的书籍,我最不需要的就是尝试改进教程以适应我的版本。

还有一个不太重要的问题:什么是“宝石”?我是否需要确保它也已完全更新?

I'm used to the One-Click install local environments of MAMP. Is there a Ruby equivalent... a download that you run and instantly get the most current versions of Ruby, Rails, SQLite running locally?

I'm using a Mac, running Leopard, and am aware that all of the aforementioned technologies ship with Leopard (except maybe SQLite). The books that I have reference newer versions and the last thing I need is to try to retrofit a tutorial to work with my version.

And one more less important question: What are "Gems" and is that something that I need to make sure is fully updated too?

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

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

发布评论

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

评论(7

千里故人稀 2024-07-24 18:49:36

当您第一次开始使用 Rails 时,安装非常混乱! 尽管如果您使用 Mac,您需要的很多东西都已安装,但我个人发现很难找到有关如何最好地进行设置的简洁信息。
由于我不想让其他人经历我在配置 Mac 开发环境时遇到的麻烦,因此我编写了一个 7 步指南,用于在 OSX Leopard 上安装 Ruby on Rails、MySQL、Apache with PHP 和 phpMyAdmin。 简而言之,包含在 Mac 上进行本地开发所需的一切!

这是链接:

http://waavoo.com/2009/7-step-guide-installing-ruby-on-rails-mysql-apache-php-phpmyadmin-intel-mac-os-x-leopard /

希望有帮助!

Installation is pretty confusing when you first start with Rails! Even though a lot of what you need is already installed if you are using Mac, personally I found it really hard to find come concise information on how to best go about setting things up.
Since I didn't want anyone else to go through the headaches that I had when configuring their Mac development environment, I've written a 7 step guide to installing Ruby on Rails, MySQL, Apache with PHP, and phpMyAdmin on OSX Leopard. In short, everything you should need to get developing locally on your Mac!

Here's the link:

http://waavoo.com/2009/7-step-guide-installing-ruby-on-rails-mysql-apache-php-phpmyadmin-intel-mac-os-x-leopard/

Hope that helps!

娇柔作态 2024-07-24 18:49:36

查看 FiveRuns 安装。 这是一个免费的 Ruby on Rails 堆栈,您可以下载。

RubyGems 是用于发布和管理第三方库的 Ruby 标准。 查看用户指南

玩得开心!

Take a look at FiveRuns Install. It's a free Ruby on Rails stack that you can download.

RubyGems is the Ruby standard for publishing and managing third party libraries. Check out the User Guide.

Have fun!

陌若浮生 2024-07-24 18:49:36

我不知道你使用的是什么 mac 操作系统,但是 Leopard (10.5.x) 已经安装了 ruby​​,你所需要的只是

gem update rails

在命令行中使用更新 gems。

如果您使用的是 Tiger (10.4.x),则安装已损坏,请按照 此链接

I have no idea what mac os are you in but Leopard (10.5.x) already have ruby installed, all you need is to updated the gems using

gem update rails

in your command line.

if you're on Tiger (10.4.x) the installation is broken, and please follow this link.

梦中的蝴蝶 2024-07-24 18:49:36

您还应该看看 Phusion Passenger - 这个以及 prefpane,允许您以简单的方式设置 apache VirtualHosts。

You should also have a look at Phusion Passenger - this, along with the prefpane, allows you to have apache VirtualHosts set up the easy way.

聚集的泪 2024-07-24 18:49:36

当前版本的 Rails 旨在通过使用 SQLite 和小型 Rub​​y Web 服务器来工作(用于开发),无需 AMP 样式堆栈,因此,如果您只进行 Rails 开发,则无需设置堆栈 -你只需输入“rails”就可以了。

但是Leopard 附带的 RubyGems 和 Rails 版本现在已经过时了,因此您需要先升级这些版本,然后才能走得太远。 我在此处写了一篇关于设置 Mac 进行开发的文章,但是最少的命令如下所示:

  1. sudo gem install ruby​​gems-update
  2. sudo update_rubygems
  3. sudo update_rubygems (是的,两次)
  4. sudo gem update --system

这些命令将 RubyGems 升级到当前版本,以便您可以安全地升级 Rails。 为此,请键入:

gem update rails

最后一个命令没有 sudo,因为如果省略它,当前版本的 RubyGems 会将 gems 的干净副本安装到您​​的主目录中,而系统版本保持不变。

最后,修改主目录中的 .profile 文件,使其中包含 PATH 的行显示:

export PATH=$HOME/.gem/ruby/1.8/bin:$PATH

关闭所有终端窗口以使此命令生效。 主目录中的 gem 包提供的实用程序现在优先于系统版本。

这意味着您可以输入“rails”,最新版本将会运行,但您没有弄乱 Apple 提供的任何软件(除了 RubyGems 的系统副本)。

将来每当有新版本出现时,要升级您的 Rails 私有副本,只需执行以下操作:

gem update rails

Current versions of Rails are designed to work (for development) without needing an AMP -style stack, by using SQLite and a small Ruby Web server, so if you will only be doing Rails development you don't need to set up a stack - you can just type "rails" and it will work.

BUT the versions of RubyGems and Rails shipped with Leopard are now outdated, though, so you'll need to upgrade these before you go too far. There's an article that I wrote on setting up a Mac for development here, but the minimum commands go like this:

  1. sudo gem install rubygems-update
  2. sudo update_rubygems
  3. sudo update_rubygems (yep, twice)
  4. sudo gem update --system

These get RubyGems up to the current release, so that you can upgrade Rails safely. To do that, type:

gem update rails

The last command doesn't have sudo, because if you omit it, current versions of RubyGems will install a clean copy of the gems into your home directory, leaving the system versions untouched.

Finally, amend the .profile file in your home directory, so that the line with PATH in it says:

export PATH=$HOME/.gem/ruby/1.8/bin:$PATH

Close up any terminal windows for this to take effect. The utilities provided by the gem packages in your home directory will now have precedence over the system versions.

This means that you can type "rails" and the latest version will run, but you haven't messed with any of the software provided by Apple (apart from the system copy of RubyGems).

To upgrade your private copy of Rails whenever a new version comes along in future it's just this again:

gem update rails
本王不退位尔等都是臣 2024-07-24 18:49:36

BitNami RubyStack 正是您正在寻找的http://bitnami.org/stack/rubystack

BitNami RubyStack is exactly what you are looking for http://bitnami.org/stack/rubystack

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