清理板岩安装Rails [英] Clean slate install Rails

查看:72
本文介绍了清理板岩安装Rails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

父亲,我做得很糟糕.我完全搞砸了我的系统. 当我尝试使Rails使用与MAMP PRO相同的MySQL时,一切都开始了. (我仍然没有设法让他们一起工作.)结局很糟,而且还在不断恶化.

Father, I've done terrible things. I've messed my system up completely. It all started back when I tried to make Rails to use the same MySQL that my MAMP PRO uses. ( I still haven't managed them to work together).It ended badly, and just keeps getting worse.

最新错误消息:

➜  ~  rails        
/Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find railties (>= 0) amongst [bigdecimal-1.1.0, io-console-0.3, json-1.5.4, minitest-2.5.1, rake-0.9.2.2, rdoc-3.9.4] (Gem::LoadError)
    from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
    from /Users/hb/.rvm/rubies/ruby-1.9.3-p0/lib/ruby/site_ruby/1.9.1/rubygems.rb:1208:in `gem'
    from /Users/hb/.rvm/gems/ruby-1.9.3-p0/bin/rails:18:in `<main>'

所以我决定,我应该只是清除RVM和Rails安装的系统,然后以一种正确的方式重新安装所有内容(目前,我已经尝试了不同的方法,包括将Rails gem作为sudo安装,不使用sudo并使用RVM).所有这些都是非常混乱的,我不知道我是怎么把它拉下来(把所有东西弄乱了的).

So I have decided, that I should probably just wipe the system clean of my RVM and Rails installations and then re-install everything in a single proper way (currently I've experimented with different approaches, including installing rails gem as sudo, without sudo, and with RVM). This all mess is very confusing, and I have no idea how did I even pull it off (to mess everything up).

无论如何-有人可以告诉我如何对所有宝石进行干净的擦拭,这样我的系统上就不会有任何痕迹,因此我可以执行干净的安装. 另外,在Mac OS X Lion上安装滑轨的最佳方法是什么.如果我只打算使用最新版本的Ruby和Rails,我应该还是不应该使用RVM?

Anyhow - can someone please tell me how to do a clean wipe on all gems, so there wouldn't be any trace of rails on my system, so I can perform a clean install. Also, what would be best way to install rails on Mac OS X Lion. Should or shouldn't I use RVM, if I am intending only to use the latest version of Ruby and Rails ?

如果我使用rvm,我不想只是忘记系统中的gems,因为偶尔不小心使用sudo时,我偶尔会遇到问题.我认为最好只有一个,就是这样.

I don't want to just forget about the gems in my system if I were to use rvm, as once in a while I run into problems when accidentally using sudo or not. I think it is best just have one and that's it.

干杯.

推荐答案

这里有一篇文章介绍了如何删除所有宝石,但请注意!

然后,这是一组命令,用于在没有RVM的情况下执行ruby 1.9.3和rails 3.2的全新安装:

Then, here are a set of commands to perform a clean install of ruby 1.9.3 and rails 3.2 without RVM:

curl ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz -o ruby-1.9.3-p0.tar.gz
tar xvf ruby-1.9.3-p0.tar.gz
cd ruby-1.9.3-p0/
autoconf
./configure --program-suffix=19 --enable-shared --with-readline-dir=/usr/local
make && sudo make install

然后从此处下载最新的rubygems: http://rubyforge.org/frs/download.php/75711/rubygems-1.8.15.tgz

Then download the latest rubygems from here: http://rubyforge.org/frs/download.php/75711/rubygems-1.8.15.tgz

tar xvf rubygems-1.8.15.tgz
cd rubygems-1.8.15
sudo ruby setup.rb

最后安装导轨

sudo gem install rails

希望有帮助!

这篇关于清理板岩安装Rails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆