升级Turnkey Rails虚拟机到最新Rails版本
来源:互联网 发布:comicstudio mac 编辑:程序博客网 时间:2024/06/05 07:39
参考资料:
http://www.turnkeylinux.org/forum/support/20110826/how-upgrade-turnkey-rails-rails-301
https://rvm.beginrescueend.com/rvm/install/
具体步骤如下:
1.选择用root来安装
2.安装curl
# Install curl. It's needed to install rvm the easy way. Ignore the error about the java .so:
apt-get install curl
3. 安装rvm
# Install rvm:(这里bash后面是一个空格,然后<,再一个空格)
bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
4. 安装在RVM下Ruby1.9.2
# Install 1.9.2 under rvm:
rvm install ruby-1.9.2
5. 指定使用1.9.2
# Make it the default:
rvm use ruby-1.9.2 --default
# Change to it (although the --default line probably does this):
rvm use ruby-1.9.2-p(patchlevel)
6. 创建gemset
# Gemset for Rails 3:
rvm gemset create rails3
# Use that gemset:
rvm gemset use rails3
# (Re-) Install Rails:
gem install rails
(具体安装版本3.1.0, 会看到一些unable to covert和file 'lib' not found, 可以忽略)
rails -v 可以看到安装的rails版本
7. 安装Passenger(RoR的部署技术)
# (Re-) Install Passenger:
gem install passenger
# Install the necessary prerequisite library:
apt-get install libcurl4-openssl-dev
Compile and install the Passenger module. First you have to find the version of Passenger that you just installed (which is in a different place from the one preinstalled in the appliance):
find /usr/local/rvm -name passenger-install-apache2-module
Two paths will appear, one of them in bin and the other one in gems. Take the shorter one and copy it. For my system, the two paths were:
/usr/local/rvm/gems/ruby-1.9.2-p290@rails3/bin/passenger-install-apache2-module
and
/usr/local/rvm/gems/ruby-1.9.2-p290@rails3/gems/passenger-3.0.8/bin/passenger-install-apache2-module
Run that script:
/usr/local/rvm/gems/ruby-1.9.2-p290@rails3/bin/passenger-install-apache2-module
IMPORTANT: Grab the configuration lines at the end of the passenger install process! If you just use the default Passenger LoadModule, PassengerRoot, and PassengerRuby lines the GEM_HOME and paths won't be set up correctly, and you'll run into issues like "bundler: cannot load file". For my system, those lines were:
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.2-p290@rails3/gems/passenger-3.0.9/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.2-p290@rails3/gems/passenger-3.0.9
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.2-p290@rails3/ruby
In /etc/apache2/conf.d/passenger, replace the three corresponding lines with the new stuff you copied.
8. 安装Node.js (不安装Rails 3.1会报这个错误 Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable))
apt-get install python-software-properties
add-apt-repository ppa:chris-lea/node.js
apt-get update
apt-get install nodejs
Set up your Rails application in /var/www/railsapp, do a bundle install, restart Apache (/etc/init.d/apache2 restart), and you're golden!
- 升级Turnkey Rails虚拟机到最新Rails版本
- Ruby on Rails版本升级
- 从rails升级到gem uninstall,gem cleanup与安装指定版本rails
- rails升级
- 升级Rails
- 升级rails
- rails 升级
- Rails 2 升级到 Rails 3 的一些经验
- 如何将Turnkey Redmine 虚拟机从Redmine 1.0.5 升级到1.2
- npm升级到最新版本
- docker升级到最新版本
- rails升级tips
- Rails
- Rails
- Rails
- rails
- Rails
- rails
- 在Eclipse上使用XFire开发WebService的过程及注意事项
- Makefile 理解(2)
- 排序方法总结
- 全文搜索服务器solr之客户端 - solrj二次开发
- Elang
- 升级Turnkey Rails虚拟机到最新Rails版本
- SQL 日期格式转换
- 信号笔记
- ARM7中断向量控制器,学习体会
- 水晶报表格式化日期
- Google Music
- Linux基础知识总结(2): 文件的压缩与打包
- UC/OS 学习 任务的同步与通讯
- DIV文本自动换行