亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊 查看新帖 |

Chinaunix

  平臺 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 5633 | 回復(fù): 1
打印 上一主題 下一主題

Ubuntu下使用RVM 安裝Rails [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2012-03-12 21:20 |只看該作者 |倒序?yàn)g覽

Ubuntu下使用RVM 安裝Rails










使用Ubuntu版本:11.04
1.安裝RVM



Java代碼
  1. 1.bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)  
復(fù)制代碼
2.安裝Ruby
RVM安裝完成后可以使用


Java代碼
  1. 1.rvm requirements  
  2. 命令查看安裝可選項(xiàng)。
  3. 執(zhí)行rvm install 1.9.2
復(fù)制代碼
Java代碼
  1. 1.ubuntu:~$ rvm install 1.9.2  
  2. 2.Fetching yaml-0.1.4.tar.gz to /home/wenpeng/.rvm/archives  
  3. 3.  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current  
  4. 4.                                 Dload  Upload   Total   Spent    Left  Speed  
  5. 5.100  460k  100  460k    0     0  51442      0  0:00:09  0:00:09 --:--:-- 63694  
  6. 6.Extracting yaml-0.1.4.tar.gz to /home/wenpeng/.rvm/src  
  7. 7.Configuring yaml in /home/wenpeng/.rvm/src/yaml-0.1.4.  
  8. 8.Compiling yaml in /home/wenpeng/.rvm/src/yaml-0.1.4.  
  9. 9.Installing yaml to /home/wenpeng/.rvm/usr  
  10. 10.Installing Ruby from source to: /home/wenpeng/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...  
  11. 11.  
  12. 12.ruby-1.9.2-p290 - #fetching   
  13. 13.ruby-1.9.2-p290 - #downloading ruby-1.9.2-p290, this may take a while depending on your connection...  
  14. 14.  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current  
  15. 15.                                 Dload  Upload   Total   Spent    Left  Speed  
  16. 16.100 8604k  100 8604k    0     0  24844      0  0:05:54  0:05:54 --:--:-- 30418  
  17. 17.ruby-1.9.2-p290 - #extracting ruby-1.9.2-p290 to /home/wenpeng/.rvm/src/ruby-1.9.2-p290  
  18. 18.ruby-1.9.2-p290 - #extracted to /home/wenpeng/.rvm/src/ruby-1.9.2-p290  
  19. 19.ruby-1.9.2-p290 - #configuring   
  20. 20.ruby-1.9.2-p290 - #compiling   
  21. 21.ruby-1.9.2-p290 - #installing   
  22. 22.Retrieving rubygems-1.8.17  
  23. 23.  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current  
  24. 24.                                 Dload  Upload   Total   Spent    Left  Speed  
  25. 25.100  246k  100  246k    0     0  50303      0  0:00:05  0:00:05 --:--:-- 60119  
  26. 26.Extracting rubygems-1.8.17 ...  
  27. 27.Removing old Rubygems files...  
  28. 28.Installing rubygems-1.8.17 for ruby-1.9.2-p290 ...  
  29. 29.Installation of rubygems completed successfully.  
  30. 30.ruby-1.9.2-p290 - adjusting #shebangs for (gem irb erb ri rdoc testrb rake).  
  31. 31.ruby-1.9.2-p290 - #importing default gemsets (/home/wenpeng/.rvm/gemsets/)  
  32. 32.Install of ruby-1.9.2-p290 - #complete   
復(fù)制代碼
設(shè)置1.9.2 作為默認(rèn)的Ruby版本



Java代碼
  1. 1.rvm use 1.9.2 --default  
復(fù)制代碼
報(bào)錯(cuò)提示



Java代碼
  1. 1.RVM is not a function, selecting rubies with 'rvm use ...' will not work.  
復(fù)制代碼
解決方法
執(zhí)行


Java代碼
  1. 1.echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile  
復(fù)制代碼
然后重啟Terminer再執(zhí)行


Java代碼
  1. 1.source .bash_profile  
復(fù)制代碼
這里還可以直接把這段命令寫進(jìn)/etc/profile



Java代碼
  1. 1.ubuntu:~$ rvm use 1.9.2 --default  
  2. 2.Using /home/wenpeng/.rvm/gems/ruby-1.9.2-p290  
復(fù)制代碼
安裝rails 需要的lib




Java代碼
  1. 1.sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion  
  2. 2.  
  3. 3.sudo apt-get install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev   
復(fù)制代碼
Java代碼
  1. 1.gem install rails   
復(fù)制代碼
如果出現(xiàn)問題的話需要remove掉ruby然后重新安裝



Java代碼
  1. 1.rvm remove ruby  
  2. 2.rvm install 1.9.2  
  3. 3.rvm use 1.9.3 --default  
  4. 4.gem install rails   
復(fù)制代碼
如果在啟動rails server的過程中提示No JavaScripts Run time 有兩個(gè)解決方法
解決方法1:
  1. Adding the following gems to my Gemfile solved the issue:

  2. gem 'execjs'
  3. gem 'therubyracer'

  4. Then of course:
復(fù)制代碼
這里需要先bundle install therubyracer
然后bundle install



解決方法2:

安裝nodejs

lijg@lijg-desktop:~/workruby/helloapp$ sudo apt-cache search nodejs
[sudo] password for lijg:
coffeescript - interpreter and compiler for the CoffeeScript language
nodejs - Node.js event-based server-side javascript engine
nodejs-dbg - Node.js event-based server-side javascript engine (debug)

nodejs-dev - Development files for Node.js

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2012-03-12 21:21 |只看該作者
謝謝分享
您需要登錄后才可以回帖 登錄 | 注冊

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會會員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP