安装 rvm、ruby、gem、rails、juggernaut 的命令
我在我的 Ubuntu1104 机器上一遍又一遍地这样做,有些东西总是让我发疯,比如:
The program 'ruby' is currently not installed. You can install it by typing:
sudo apt-get install ruby
即使在安装了 ruby 之后,它也明确表示“安装成功”。 另外:
rvm list
告诉我:
rvm rubies
ruby-1.9.2-p290 [ i686 ]
这:
which ruby
which gem
什么也不返回。
那么有人可以说明安装 ruby 的正确顺序吗?它是像 Rails 和 Juggernaut 这样的宝石。我相信我在路径(系统找不到成功安装的好东西)和权限(有时必须使用 sudo,有时不需要,这可能是我遇到的路径问题的原因)方面遇到问题。因此,还请明确说明安装位置和使用权限。
我认为首先是 RVM(如 http://beginrescueend.com/rvm/install/ 中所述) :
1) bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
2) bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
3) echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
然后是 Ruby(也安装 gem):
4) rvm 1.9.2
然后是像 Rails 和 juggernaut 这样的 gem,
5) gem install rails
6) gem install juggernaut
...
不幸的是我收到了上面发布的消息,“gem 未安装”和“ruby 未安装”。
另外,您还可以先安装 ruby,然后将 RVM 作为 gem 安装...令人困惑...
干杯,伙计们! 苹果
I've been doing it over and over again on my Ubuntu1104 machine and something always keeps driving me nuts, like:
The program 'ruby' is currently not installed. You can install it by typing:
sudo apt-get install ruby
And that even after installing ruby, which clearly stated "installed successfully".
Also:
rvm list
tells me:
rvm rubies
ruby-1.9.2-p290 [ i686 ]
This:
which ruby
which gem
returns nothing.
So can someone please state the correct order to install ruby and it's gems like rails and juggernaut. I believe that I have trouble with paths (the system can't find successfully installed goodies) and rights (sometimes have to sudo and sometimes not, wich might be the cause for the path trouble I have). So please also give clear instructions on where to install and which rights to use.
I thought it's RVM first (as stated in http://beginrescueend.com/rvm/install/):
1) bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
2) bash < <(curl -sk https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)
3) echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile
And then Ruby (which also installs gem):
4) rvm 1.9.2
And then the gems like rails and juggernaut
5) gem install rails
6) gem install juggernaut
...
Unfortunately I get a message as posted above, 'gem not installed' and 'ruby not installed'.
Plus you can also install ruby first and then install RVM as a gem... confusing...
Cheers mates!
Mac
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您没有正确安装 rmv:
是什么意思
如果这不是您所看到的,那么 do :
重试
重新启动 bash 并在 do 之后
you did not intsalled rmv correctly:
what does
If this is not what you see, then do :
restart bash and try again
after do
确保
rvm 使用 1.9.2
,以防它不是默认版本make sure you
rvm use 1.9.2
in case it doesn't default应首先安装
rvm
。之后是宝石。我不明白 rvm 如何成为宝石,但可能是。
如果您在通过 rvm 选择 ruby 后输入
which ruby
,那么您的 rvm 安装有问题;通过删除您的主.rvm
目录重新开始。验证预期的命令是否在您的
.bashrc
中(在 Ubuntu 上,我没有.bash_profile
,这更多是 OS X 的事情,但可能是版本或设置差异而不是错误的)。您可以查看主目录中有哪些文件。rvm
should be installed first.After that the gems. I don't see how rvm could be a gem, but could be.
If you type
which ruby
after selecting a ruby via rvm then something is wrong with your rvm installation; start over by deleting your home.rvm
directory.Verify the expected command is in your
.bashrc
(on Ubuntu I don't have a.bash_profile
, that's more an OS X thing, but could be a version or setup difference rather than wrong). You can see what files are in your home directory.