rbenv

reinstall every gem for each ruby version?

感情迁移 提交于 2019-12-03 09:19:06
问题 I just installed Ruby 2.0.0 using rbenv and set it to the global ruby version for my system. Since 2.0 is compatible with 1.9.3, I tried to start up a Rails project with it, but got the following error. I did rbenv rehash after installing 2.0 The `rails' command exists in these Ruby versions: 1.9.3-p327 Does this mean that every gem I installed on my system with 1.9.3 has to be reinstalled if I wish to use it with 2.0? 回答1: Yes. Rbenv (and RVM) have separate "gem home" directories for each

rbenv can't change global ruby version

淺唱寂寞╮ 提交于 2019-12-03 09:08:39
问题 My Mac OS X has a default ruby. $ ruby -v ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13] I installed rbenv and ruby version 2.1.2. $ rbenv versions system * 2.1.2 (set by /Users/sdw/.rbenv/version) and I tried to set the global ruby version to 2.1.2, but nothing happened. $ rbenv global 2.1.2 $ ruby -v ruby 2.0.0p451 (2014-02-24 revision 45167) [universal.x86_64-darwin13] So I tried to do the same thing with command sudo , but the result is the same. $ sudo rbenv

Should rbenv be installed system-wide, or at a user level?

♀尐吖头ヾ 提交于 2019-12-03 06:09:17
I'm building a vagrant setup, and part of that is installing rbenv. I'm using librarian-chef to manage all my chef cookbooks, and it installs rbenv and ruby-build. However, when I tried to ssh into my Vagrant VM and type ruby -v I got the standard system-installed ruby 1.8.7 (2012-02-08 patchlevel 358) [x86_64-linux] . Thinking that maybe rbenv was not installed, I tried running rbenv versions , but rbenv was in fact installed: vagrant@precise64:~$ rbenv versions * system (set by /opt/rbenv/version) So then I tried rbenv install [version] : vagrant@precise64:~$ rbenv install 1.9.3-p327 [...]

rbenv: ruby: command not found

自作多情 提交于 2019-12-03 05:10:33
I am using rbenv with ruby version 1.9.1-p378 on the local dir. Command ruby -v gives the following error: rbenv: ruby: command not found The `ruby' command exists in these Ruby versions: 2.0.0-p353 Any clue why this happens? The bundle, rails commands do not work either. Command rbenv versions : * 1.9.1-p378 (set by /home/user/Desktop/r1/noko1/.ruby-version) 2.0.0-p353 The complaint you get comes from rbenv. The fact that it's complaining shows that rbenv is set up and working. Figure out what version of Ruby is needed to run the project. Either the project comes with a .ruby-version file in

Install Latest Stable Version of Ruby Using rbenv

时间秒杀一切 提交于 2019-12-03 04:42:59
问题 I want to install the latest stable version of Ruby available with rbenv. This feature won't be happening in rbenv itself. When I run the command rbenv install -l in my shell, I get a long list of available versions. The list has all types of entries. The following is a partial list to demonstrate the format and diversity: $ rbenv install -l Available versions: 2.0.0-p643 2.0.0-p645 2.1.0-dev 2.1.0-preview1 2.1.0-preview2 2.1.0-rc1 2.1.4 2.1.5 2.1.6 2.2.0-dev 2.2.0-preview1 2.2.0-preview2 2.2

rails rbenv: rails: command not found

梦想的初衷 提交于 2019-12-03 04:22:41
问题 I have recently moved from RVM to Rbenv and when attempting to execute rails I am getting an error like the one below Pauls-Air:~ $ rails rbenv: rails: command not found The `rails' command exists in these Ruby versions: 2.1.2 回答1: After installing a gem via the command line in a ruby version you have to execute rbenv rehash as described in the docs here and here For example: $ rbenv install 2.2.0 $ gem install bundler $ rbenv rehash $ gem install rails $ rbenv rehash 回答2: You need to install

uninstall ruby version from rbenv

微笑、不失礼 提交于 2019-12-03 04:06:37
问题 How to uninstall or remove ruby version from rbenv. I have installed two versions of ruby. While switching to ruby 1.9.3, I am getting segmentation fault. Can anyone please help, how to remove a particular version from rbenv? 回答1: New way Use the uninstall command: rbenv uninstall [-f|--force] <version> rbenv uninstall 2.1.0 # Uninstall Ruby 2.1.0 Use rbenv versions to see which versions you have installed. Old way To remove a Ruby version from rbenv, delete the corresponding directory in ~/

Setting up env, OSX rbenv and bundle battle

女生的网名这么多〃 提交于 2019-12-03 02:17:41
So i have just swapped over to mac from ubuntu and setting up the env has not been as easy as promised. this is the process i followed. installed xcode - then went into the prefrences and downloaded the command line tools then verified that the right version was installed, by running gcc --version i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.11.00) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Why do I get the error “Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2” although I have 2.2.2 installed

本秂侑毒 提交于 2019-12-03 01:31:42
I'm using rbenv and I get the error Your Ruby version is 2.0.0, but your Gemfile specified 2.2.2 when I run the bundle install command in my project. The strange thing is that I've actually got the 2.2.2 version installed (as my Gemfile specifies), and not the 2.0.0 version. (See image below). I tried the solution offered in this thread: Your Ruby version is 2.0.0, but your Gemfile specified 2.1.0 , but it had no effect. I'm on an MacBook Air with Yosemite if that makes any difference. Update: which ruby -> Users/myuser/.rbenv/shims/ruby ruby -v -> ruby 2.2.2p95 (2015-04-13 revision 50295)

reinstall every gem for each ruby version?

。_饼干妹妹 提交于 2019-12-02 23:47:06
I just installed Ruby 2.0.0 using rbenv and set it to the global ruby version for my system. Since 2.0 is compatible with 1.9.3, I tried to start up a Rails project with it, but got the following error. I did rbenv rehash after installing 2.0 The `rails' command exists in these Ruby versions: 1.9.3-p327 Does this mean that every gem I installed on my system with 1.9.3 has to be reinstalled if I wish to use it with 2.0? Yes. Rbenv (and RVM) have separate "gem home" directories for each installed version of Ruby. There may be ways to symlink certain directories to get them to share, but this