在我的服务器上,我有许多Rails应用程序以及gitlab,红宝石版本由RVM管理
$CSC = "1100 4WWW" #Hardcoded value to test against #CSC are always <#### #ChChCh>
$roster = Import-Csv <my path>
$flag = $false
Foreach ($row in $roster)
{
If ($CSC -eq $row.CSC)
{
$Department = $row.Department
$Division = $row.Division
$Street = $row.Street
$City = $row.City
$State = $row.State
$Zipcode = $row.Zipcode
$OfficePhone = $row.Phone
$Country = $row.Country
$flag = $true
}
Else { }
}
If (!$flag)
{
#your 'not a match' code goes here
}
我当前的默认红宝石版本是2.2.5
[XXX@XXX ~]$ echo $PATH
/usr/local/rvm/gems/ruby-2.1.1/bin:/usr/local/rvm/gems/ruby-2.1.1@global/bin:/usr/local/rvm/rubies/ruby-2.1.1/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/bin:/root/bin:/usr/src/git/bin:/home/admlpfr/bin
将成功,但不能解决我的问题 如果我再次设置默认的Ruby版本
[XXX@XXX ~]$ rvm list
Warning! PATH is not properly set up, /home/admlpfr/.rvm/gems/ruby-2.2.5/bin is not available.
Usually this is caused by shell initialization files. Search for PATH=... entries.
You can also re-add RVM to your profile by running: rvm get stable --auto-dotfiles
To fix it temporarily in this shell session run: rvm use ruby-2.2.5
To ignore this error add rvm_silence_path_mismatch_check_flag=1 to your ~/.rvmrc file.
ruby-2.1.1 [ x86_64 ]
=* ruby-2.2.5 [ x86_64 ]
# => - current
# =* - current && default
# * - default
rvm get stable --auto-dotfiles
$ PATH将显示ruby 2.2.5的路径,但仍无法通过gitlab服务重新启动
每次我尝试重新启动gitlab服务时,都会得到以下结果
rvm use 2.2.5 --deafult