Ruby on rails 环境安装
来源:互联网 发布:阿里云按流量的划算吗 编辑:程序博客网 时间:2024/04/29 08:20
# ruby --version
ruby 1.8.7 (2012-02-08 MBARI 8/0x6770 on patchlevel 358) [x86_64-linux], MBARI 0x6770, Ruby Enterprise Edition 2012.02 # rails -v Rails 2.3.11
I need to upgrade the ruby and rails version, take a Live Chat with Bluehost support, the guy let me follow this post https://my.bluehost.com/cgi/help/rails but it just tell us how to deploy the rails, so I need to reinstall the rails.
Install Ruby 1.9
[~/src/rubygems-1.8.24]# ruby setup.rb
/home4/lytsingo/.local/lib/ruby/1.9.1/yaml.rb:56:in `<top (required)>': It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. RubyGems 1.8.24 installed
so need to install libyaml first
# mkdir ~/src
# cd ~/src
# wget http://pyyaml.org/download/libyaml/yaml-0.1.4.tar.gz
# tar xvf yaml-0.1.4.tar.gz
# cd yaml-0.1.4
# ./configure -prefix=$HOME/.local
# make -j8
# make install
# make clean
*Note*: Let compile faster, I use make -j 8, it depends your cpu processors, see:
cat /proc/cpuinfo |grep processor |wc -l 8
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p0.tar.gz
# tar xvf ruby-1.9.3-p0.tar.gz
# cd ruby-1.9.3-p0
# ./configure -prefix=$HOME/.local --disable-install-doc --with-opt-dir=$HOME/.local
# make -j8
# make install
# make clean
Install gems
# tar xvf rubygems-1.8.24.tgz
# cd rubygems-1.8.24
# ruby setup.rb
Install Rails 3
gem install rails -v 3.2.8 --no-rdoc --no-ri
没反应的,因为gem install 安装在后台没有屏显,可以在命令结尾加上-V实时的显示安装进程
Check it out:
# ruby -v
ruby 1.9.3p0 (2011-10-30) [x86_64-linux] # rails -v Rails 3.2.8
ACTION:
Rails的ruby版本需要在1.90以上...大家可以自己下载一个版本,然后
1../configure
2.make
3.make install
4.make clean
但是安装完成之后执行ruby 提示在/usr/bin 目录下找不到ruby
这个时候:
1、找到ruby安装的位置。执行:whereis ruby。应该可以看到一个xxxx/bin/ruby 的位置。假如为:/usr/local/bin/ruby2、编辑个人的.bashrc文件。执行:vi ~/.bashrc ,然后在最末尾添加一行:export PATH=/usr/local/bin:$PATH。重新登录linux或者执行 source ~/.bashrc后,执行ruby -v就可以找到ruby了。补充:第二步中编辑~/.bashrc文件,添加的环境变量只对自己有效,如果编辑/etc/profile就会对所有用户有效。
0 0
- Ruby on rails 环境安装
- Ruby on Rails,环境安装和Gems
- ubuntu安装ruby on rails环境
- win7安装ruby on rails开发环境
- ruby on rails开发环境安装血泪史
- Ubuntu 安装ruby on rails 环境
- Ruby on rails 实战圣经:安装Rails开发环境
- Ruby on rails 实战圣经:安装Rails开发环境
- Ruby on Rails 安装
- 安装Ruby On Rails
- 安装Ruby on Rails
- 安装 ruby on rails
- Ruby on Rails 安装
- ruby on rails安装
- ruby on rails 安装
- ruby on rails安装
- Ruby On Rails 安装
- Ruby on Rails安装
- vlc的第三方库contrib的修改之二:ffmpeg的库的修改
- Linux设备驱动---OMAP3630 Linux I2C总线驱动分析(2)
- 使用Seed Fill算法进行肤色变换
- centos 6.4 (64bit)中ibus-googlepinyin的候选词个数问题
- C和指针笔记
- Ruby on rails 环境安装
- 三层架构
- eclipse下提交job时报错mapred.JobClient: No job jar file set. User classes may not be found.
- CentOS 6.4 Cacti安装
- 常使用的一些命令
- OpenCV成长之路(1):图像的读写与显示
- 如何扩展VMWARE的磁盘空间
- fedora16安装后做的几个配置
- cocos2d-x 触屏主角移动轨迹