当前位置: 首页 > 工具软件 > Hobo > 使用案例 >

utuntu 12.04 安装rails及Hobo

杨飞飙
2023-12-01
1、安装RVM
安装curl
sudo apt-get install curl
安装 GCC G++ 等
sudo apt-get install build-essential
安装RVM
curl -L get.rvm.io | bash -s stable
安装RVM PKG
rvm pkg install openssl && rvm pkg install zlib && rvm pkg install libyaml && rvm pkg install iconv rvm install 1.9.3-p0 --with-opt-dir=$HOME/.rvm/usr --with-libxml2-dir=/usr/local/Cellar/libxml2/2.7.8 --with-readline-dir=/usr/local/Cellar/readline/6.2.1

rvm pkg install readline
rvm pkg install iconv
rvm pkg install zlib
rvm pkg install openssl

安装后碰上问题找不到什么包 xxx
用 rvm pkg install xxx 把包安装上

2、安装rails
rails -v 报错:找不到rails
解决办法
bash --login

3.安装mysql 相关
$ sudo apt-get install libmysql-ruby libmysqlclient-dev

4.sqlite3 未能安装
sudo apt-get install sqlite sqlite3
sudo apt-get install sqlite3 libsqlite3-dev

5.安装五笔输入法
sudo apt-get install ibus-table-wubi

6.安装hobo pre
gem install hobo --pre
记得gemfile中加上:
gem 'therubyracer', :platforms => :ruby 如果出错

首先安装
gem install libv8
然后安装
gem install therubyracer
或:gem install therubyracer --pre

7. 用thin服务器则:加上
gem 'thin'
rails s thin

8.Mysql2
gem install mysql2
若出错:
ERROR: Failed to build gem native extension.
参考:
http://www.iteye.com/topic/1123235


其它参考:
http://li.dashuang.name/rails/2012/05/26/ubuntu-1204-install-rails-development-env/
http://www.07net01.com/linux/ubuntu_12_04_RVM_anzhuangrails_8133_1344502163.html


http://sn.wang.blog.163.com/blog/static/309328962012101482828848/
ubuntu 12.10安装ruby和rails3

2012-11-14 08:32:10| 分类: Linux | 标签:linux ubuntu 安装 rails3 ruby |字号 订阅
基本上参考:http://macklinchaffee.com/ubuntu-12-10-rails3-2node-js-virtualbox-installation/

以下操作的“rvm use 1.9.3”会提示出错,应该调整terminal的设置:编辑->配置文件首选项(O)->标题和命令->点选“以登录Shell方式运行命令(R)”

安装ruby:

$ sudo apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev
$ sudo apt-get install libyaml-dev libsqlite3-dev sqlite3 libxml2-dev
$ sudo apt-get install libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversions

$ sudo apt-get install curl # Required
$ curl -L get.rvm.io | bash -s stable # Get RVM
$ source ~/.bashrc # Reboot the shell
$ rvm requirements # To get the command below


$ rvm install 1.9.3 # Install ruby v1.9.3 ..。
# 上面一句可能不灵光,可能要感谢伟大的党,换成下面一句,because the GFW in china, the https invaild so we must use:

$ rvm install ruby-1.9.3-p327 --verify-downloads 1

$ rvm use 1.9.3 --default
$ gem install rails # Install rails (I had to run this command twice. Error trying to find railties the first time.. weird)


安装Git

sudo apt-get install git-core


安装Node.js(注意,原来的位置是http,现在要用https才行)

$ sudo apt-get install nodejs
$ curl https://npmjs.org/install.sh | sudo sh


安装Heroku

$ gem install heroku
$ heroku login
$ heroku keys:add
 类似资料: