Ubuntu上安装Rails和Sublime Text

Posted by Lawrence Sun on 2013-03-29

基本步骤和上次在raspberry pi上的安装类似,不同的是,安装速度哗哗的。

出现的几个问题都通过stackoverflow上找到答案了。

一个是用rvm安装ruby的时候,出现

Installing requirements for ubuntu, might require sudo password.
Running 'apt-get --quiet --yes update' would require sudo.
Cowardly refusing to continue, please read 'rvm autolibs'.
Updating repositories
Missing required packages: libgdbm-dev, libffi-dev.
Cowardly refusing to continue, please read 'rvm autolibs'.
解决方法是
\curl -L https://get.rvm.io | bash -s stable --autolibs=3 --rails
还有一个问题是装完rails之后执行 -v时 出现
The program 'rails' is currently not installed. You can install it by typing: sudo apt-get install rails
解决方法是

set the 'Run command as login shell' checkbox on the Title and Command tab inside of gnome-terminal's Settings page.

上次在raspberry pi上安装sublime text 2 失败,这次很顺利。

sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
参考http://wbond.net/sublime_packages/package_control/installation#Testing_Version

安装package control

打开时又出现unable to run package setup...error13的错误

google未果,terminal sudo运行没有问题。

结合错误提示,应该是权限的原因。在ruby-china搜到了解决方法:

sudo chown -R lawrence:lawrence ~/.config/sublime-text-2
sudo chmod 700 -R ~/.config/sublime-text-2
chown - change file ownership

chmod - modify file access rights

700(rwx------) The file's owner may read, write, and execute the file. Nobody else has any rights. This setting is useful for programs that only the owner may use and must be kept private from others.