rbenv

Can't install RMagick with rbenv

空扰寡人 提交于 2019-11-29 18:06:27
问题 I'm using rbenv on my Ubuntu 10.04 server and I already installed ImageMagick, but I can't get RMagick to install successfully. I get the following error message Can't install RMagick 2.13.1. Can't find MagickWand.h Any ideas? Thanks! 回答1: You need to install the development headers for libmagickwand like so: apt-get install libmagickwand-dev 来源: https://stackoverflow.com/questions/9855818/cant-install-rmagick-with-rbenv

Having trouble installing any ruby 1.9.x (with rbenv) on mac osx due to psych YAML parse errors

瘦欲@ 提交于 2019-11-29 16:59:29
I tried to get rvm uninstalled in order to use rbenv on my Mac. Everything works fine until ruby comes into play.. when using rbenv install 1.9.3-p194 it compiles it correctly, but after that I'd like to install bundler.. this produces the following error computer:~ computer$ gem install bundler /Users/computer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse': (<unknown>): mapping values are not allowed in this context at line 1 column 34 (Psych::SyntaxError) from /Users/computer/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/psych.rb:203:in `parse_stream' from /Users/computer/

Your Ruby version is 2.1.0, but your Gemfile specified 2.0.0

浪尽此生 提交于 2019-11-29 11:55:57
In my Gemfile I specified ruby version 2.0.0: ruby '2.0.0' But my console tells me I have 2.1.0dev: $ ruby -v ruby 2.1.0dev (2013-09-16 trunk 42951) [x86_64-darwin12.4.0] I am using rbenv and it tells my I don't have 2.1.0 installed, $ rbenv versions system * 2.0.0-dev Bundle update or bundle install says: "Your Ruby version is 2.1.0, but your Gemfile specified 2.0.0" but using 'rbenv local 2.0.0-dev' leaves me with ruby 2.1.0dev again. Furthermore: $ rbenv global 2.0.0-dev $ cat ~/.bash_profile: export PATH="$HOME/.rbenv/bin:$PATH" if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi

How do I ensure ruby gems are installed in right place to be executed by bundler?

随声附和 提交于 2019-11-29 11:33:17
I seem to be constantly having problems with getting the gems in the right place (and not needing to use sudo when installing them.) To address the sudo issue, I installed rbenv and then use that to install ruby 2.1.0 so that I had a separate one from Mac OSX system. Then I installed bundler. But when I install gems from a Gemfile with bundler, I cannot find them. Between all the steps I have taken, such as adding lines to my .bash_profile and so forth, I have the following, but really just want a clear, straightforward way to manage gems and their local execution: gem env : Edit: I removed

Using rbenv doesn't work with sudo?

牧云@^-^@ 提交于 2019-11-29 07:06:21
Any commands that use sudo don't seem to work with RBenv. I'm trying to install ActiveRecord and it says I don't have write permission, so when I try this: ERROR: While executing gem ... (Gem::FilePermissionError) You don't have write permissions into the /usr/local/rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1 directory. It says: sudo: gem: command not found How can I get around this? The idea behind tools like rbenv and RVM is that you don't need to use sudo , because your entire Ruby environment exists inside your own workspace as a sandbox. RVM allows multi-user configurations though it

rbenv irb history is not saving

安稳与你 提交于 2019-11-29 01:31:38
I install ruby via rbenv-installer . When I use irb console, I can use history by pressing up and down on keyboard. And when I exited from console and start it again, I can't use prewious history. When I press up-arrow-button, nothing was happened. When I used rvm this option was working. How can I switch on it in rbenv? arturtr I found this way for solving my problem. In file ~/.irbrc write: require 'irb/ext/save-history' #History configuration IRB.conf[:SAVE_HISTORY] = 100 IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" Found in this question: irb history not working Create ~/

How to use correct ruby in vim ? How to modify $PATH in VIM?

不羁岁月 提交于 2019-11-28 19:43:08
I use plain Vim with ruby support on Lion (installed by gist ). I am using ruby with rbenv so my path looks like /users/me/.rbenv/shims:..... From within vim the path is :!echo $PATH > usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/fb/.rbenv/shims:.... Even I can create and modify an environment variable: :let $PATH = "/bar:/foo" :!echo $PATH > /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/foo:/bar paths remains starting with /usr/bin. So how can I access my ruby 1.9.3 in ~/.rbenv/shims instead the system ruby in /usr/bin ? This is a known problem introduced by

What are the differences between rbenv, rvm, and chruby? [closed]

走远了吗. 提交于 2019-11-28 19:28:35
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 5 years ago . I'm new-ish to Ruby and Rails. I am looking for a purely objective list of features and advantages/disadvantages of each. In an effort to keep preference out of this, please refrain from answering unless you have used all 3 systems. 回答1: There's three main options available

rbenv: Surviving without gemsets

廉价感情. 提交于 2019-11-28 16:50:13
TL;DR Don't bother with gemsets; multiple versions of a gem may be installed concurrently. When necessary, specify which version to execute using $ gem-based-binary _version_ args notation. Use bundle exec when you have a Gemfile specifying the version. gem install rails -v 3.2.13 rails _3.2.13_ new Project2 cd Project2 bundle exec rails server UPDATE: 2015-06-04 I wrote this question three years ago. Partly, it was based on a false assumption, and partly the situation has changed since then. With appreciation to @indirect for his original answer, I want to call attention to @kelvin's newer

Cannot execute “rails console” due to an error with readline

血红的双手。 提交于 2019-11-28 16:36:37
I cannot execute rails console due to this error: localhost:TwitterForZombies wiz$ rails c /Users/wiz/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/irb/completion.rb:9:in `require': dlopen(/Users/wiz/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.2.1/readline.bundle, 9): Library not loaded: /usr/local/opt/readline/lib/libreadline.6.2.dylib (LoadError) Referenced from: /Users/wiz/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.2.1/readline.bundle Reason: image not found - /Users/wiz/.rbenv/versions/1.9.3-p194/lib/ruby/1.9.1/x86_64-darwin12.2.1/readline.bundle from /Users/wiz/