Rails rails 版本控制问题

zhang991228752 · 2012年12月01日 · 最后由 zhang991228752 回复于 2012年12月01日 · 5338 次阅读

求版本控制方法 my@my-desktop:~$ rvm info

[email protected]:

system: uname: "Linux my-desktop 3.2.0-33-generic-pae #52-Ubuntu SMP Thu Oct 18 16:39:21 UTC 2012 i686 athlon i386 GNU/Linux" system: "ubuntu/12.04/i386" bash: "/bin/bash => GNU bash,版本 4.2.24(1)-release (i686-pc-linux-gnu)" zsh: "/usr/bin/zsh => zsh 4.3.17 (i686-pc-linux-gnu)"

rvm: version: "rvm 1.16.20 (stable) by Wayne E. Seguin [email protected], Michal Papis [email protected] [https://rvm.io/]" updated: "19 days 2 hours 16 minutes 22 seconds ago"

ruby: interpreter: "ruby" version: "1.8.7" date: "2012-10-12" platform: "i686-linux" patchlevel: "2012-10-12 patchlevel 371" full_version: "ruby 1.8.7 (2012-10-12 patchlevel 371) [i686-linux]"

homes: gem: "/home/my/.rvm/gems/[email protected]" ruby: "/home/my/.rvm/rubies/ruby-1.8.7-p371"

binaries: ruby: "/home/my/.rvm/rubies/ruby-1.8.7-p371/bin/ruby" irb: "/home/my/.rvm/rubies/ruby-1.8.7-p371/bin/irb" gem: "/home/my/.rvm/rubies/ruby-1.8.7-p371/bin/gem" rake: "/home/my/.rvm/gems/ruby-1.8.7-p371@global/bin/rake"

environment: PATH: "/home/my/.rvm/gems/[email protected]/bin:/home/my/.rvm/gems/ruby-1.8.7-p371@global/bin:/home/my/.rvm/rubies/ruby-1.8.7-p371/bin:/home/my/.rvm/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/ruby/bin" GEM_HOME: "/home/my/.rvm/gems/[email protected]" GEM_PATH: "/home/my/.rvm/gems/[email protected]:/home/my/.rvm/gems/ruby-1.8.7-p371@global" MY_RUBY_HOME: "/home/my/.rvm/rubies/ruby-1.8.7-p371" IRBRC: "/home/my/.rvm/rubies/ruby-1.8.7-p371/.irbrc" RUBYOPT: "" gemset: "rails3.0.5"

my@my-desktop:~$ rails --version internal:gem_prelude:1:in require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in' my@my-desktop:~$

Path to your oh-my-zsh configuration.

ZSH=$HOME/.oh-my-zsh

Set name of the theme to load.

Look in ~/.oh-my-zsh/themes/

Optionally, if you set this to "random", it'll load a random theme each

time that oh-my-zsh is loaded.

ZSH_THEME="robbyrussell"

Example aliases

alias zshconfig="mate ~/.zshrc"

alias ohmyzsh="mate ~/.oh-my-zsh"

Set to this to use case-sensitive completion

CASE_SENSITIVE="true"

Comment this out to disable weekly auto-update checks

DISABLE_AUTO_UPDATE="true"

Change this value to set how frequently ZSH updates¬

export UPDATE_ZSH_DAYS=13

Uncomment following line if you want to disable colors in ls

DISABLE_LS_COLORS="true"

Uncomment following line if you want to disable autosetting terminal title.

DISABLE_AUTO_TITLE="true"

Uncomment following line if you want red dots to be displayed while waiting for completion

COMPLETION_WAITING_DOTS="true"

Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)

Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/

Example format: plugins=(rails git textmate ruby lighthouse)

plugins=(git)

source $ZSH/oh-my-zsh.sh

Customize to your needs...

export PATH=$PATH:$HOME/.rvm/bin [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"

@winnie 我有装的 可我不会用 3.2.9 这个版本是 rvm 装的 3.0.5 这个版本是 gem 装的

@winnie 我的意思是说我不会用 rvm 切换版本

在项目下新建.rvmrc 文件,内容如下: rvm use ruby-1.9.3-p125

ruby 1.8.7 (2012-06-29 patchlevel 370) [i686-linux]

@winnie ruby 1.8.7 (2012-06-29 patchlevel 370) [i686-linux]

my@my-desktop:~$ rails -v internal:gem_prelude:1:in require': cannot load such file -- rubygems.rb (LoadError) from <internal:gem_prelude>:1:in' my@my-desktop:~$

@santochancf my@my-desktop:~$ rvm use [email protected] --default Using /home/my/.rvm/gems/ruby-1.8.7-p371 with gemset rails3.0.5 my@my-desktop:~$ rails -v 程序“rails”尚未安装。您可以使用以下命令安装: sudo apt-get install rails

需要 登录 后方可回复, 如果你还没有账号请 注册新账号