简体   繁体   English

试图在OSX Mountain Lion上安装Ruby / Rails

[英]Trying to get Ruby/Rails installed on OSX Mountain Lion

This is my first question please be nice. 这是我的第一个问题,请保持友好。

I've been trying to get my hands dirty with ruby/rails for a small coding project. 我一直在尝试为一个小型编码项目弄脏红宝石/导轨。 I have Mountain Lion, and have been trying to use various techniques i've found on stackoverflow, and across the interwebs. 我有Mountain Lion,并且一直在尝试使用我在stackoverflow和跨网络发现的各种技术。 It's not going so great! 情况不是很好! Nothing works of course. 当然没有任何作用。 I have the system version of Ruby (1.8.7) as of now, and a bunch of broken junk from trying and failing to install Ruby! 到目前为止,我的系统版本为Ruby(1.8.7),并且由于尝试安装Ruby而失败,导致一堆破烂!

When I install Rails via gem install, it sat for awhile... I finally learned to use -V, and noticed everything was returning back 302, and this takes forever, and finally it installs -- I get this output when I try to run rails -v 当我通过gem install安装Rails时,它坐了一会儿...我终于学会了使用-V,并且注意到一切都回到了302,这花了很长时间,最后安装了-当我尝试安装时,我得到了这个输出运行rails -v

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:230:in `activate': can't activate rack (~> 1.4.5, runtime) for ["actionpack-3.2.13", "railties-3.2.13"], already activated rack-1.5.2 for ["rack-ssl-1.3.3", "railties-3.2.13"] (Gem::LoadError) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems.rb:230:在`activate'中:无法为[激活机架(〜> 1.4.5,运行时) “ actionpack-3.2.13”,“ railties-3.2.13”],已为[“ rack-ssl-1.3.3”,“ railties-3.2.13”]]激活了rack-1.5.2(Gem :: LoadError)

It looks like some dependencies are broken? 看起来某些依赖项已损坏? Anyhow I'm now trying to use RVM now to get another version of ruby and setup grails with brew, This is telling me that I need a newer version of ruby to install anything pretty much?? 无论如何,我现在正尝试使用RVM来获取另一个版本的ruby并通过brew设置grails,这告诉我,我需要较新版本的ruby来安装几乎所有东西? Here is the output. 这是输出。

rvm install 1.9.2-head Installing requirements for osx, might require sudo password. rvm install 1.9.2-head osx的安装要求,可能需要sudo密码。 Skipping brew update make sure your formulas are up to date. 跳过brew update以确保您的公式是最新的。 Cowardly refusing to continue, please read 'rvm autolibs'. 胆怯地拒绝继续,请阅读“ rvm autolibs”。

To proceed rvm requires a ruby-1.9|ruby-2 compatible ruby is installed. 要继续进行rvm,需要安装ruby-1.9 | ruby​​-2兼容的ruby。 We attempted to install ruby automatically but it failed. 我们尝试自动安装ruby,但是失败了。 Please install it manually (or a compatible alternative) to proceed. 请手动安装(或兼容的替代产品)以继续。

-- I am getting os frustrated here, please throw me a bone and help me out --- If I have to have to I'll setup a linux vm just to get rails running -- yet I prefer working on my mac. -我在这里感到沮丧,请把骨头给我帮忙---如果我必须设置Linux vm以使Rails运行-但我更喜欢在Mac上工作。

Please any advice?? 请任何建议? I just want a working version of Rails 3 on my Mac this is allThanks in advance 我只想在Mac上使用Rails 3的工作版本,这一切都是在先感谢

Please go through www.railsinstaller.org for detailed installation and setup process. 请访问www.railsinstaller.org了解详细的安装和设置过程。 This guide should answer all of your questions. 本指南应回答您的所有问题。

Have you tried this tutorial http://net.tutsplus.com/tutorials/ruby/how-to-install-ruby-on-a-mac/ The tutorial includes all the errors you may come across during the installation. 您是否尝试过本教程http://net.tutsplus.com/tutorials/ruby/how-to-install-ruby-on-a-mac/该教程包含了安装过程中可能遇到的所有错误。 According to this tutorial Ruby on Rail comes with the mac out of the box. 根据本教程,Ruby on Rail是Mac随附的。

Have you tried JewelryBox? 您尝试过JewelryBox吗? It provides a painless install method for rvm and a great little gui that helps you monitor the size of your gem sets, and installs of ruby. 它为rvm提供了一种轻松的安装方法,并提供了一个不错的小gui,可帮助您监视宝石集和红宝石的安装大小。 Along with helpful reminders to upgrade rvm. 以及有用的提醒,以升级rvm。 I resisted at first using it, because using a GUI made me feel like a noob, but it really is a great little tool, that makes for super easy installs of ruby, and rvm, and consequently rails. 一开始我拒绝使用它,因为使用GUI使我感觉像个菜鸟,但这确实是一个很棒的小工具,它使安装ruby和rvm并因此非常容易安装rails非常容易。

http://jewelrybox.unfiniti.com/ http://jewelrybox.unfiniti.com/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM