rbenv

Can I execute gems from outside an rbenv environment?

落花浮王杯 提交于 2020-01-24 21:27:13
问题 I am able to install and execute a gem as follows: rbenv install 2.4.1 rbenv local 2.4.1 # enter the environment gem install fpm fpm --version I was expecting to be able to execute the gem from outside the environment too, something like: rbenv local --unset # leave the environment rbenv rehash # update shims fpm --version But instead I get: rbenv: fpm: command not found The `fpm' command exists in these Ruby versions: 2.4.1 Have I misunderstood how rbenv shims work? Can I execute a gem from

Rbenv not using the correct version

扶醉桌前 提交于 2020-01-16 18:29:05
问题 In my rails project, when I try to run bundle install , I get the following error: Your Ruby version is 2.3.7, but your Gemfile specified 2.5.3 However, when I run ruby --version I get: ruby 2.5.3p105 (2018-10-18 revision 65156) [x86_64-darwin18] ...and running rbenv version gives me: 2.5.3 (set by /Users/jamesmulholland/proj/repo-name/.ruby-version) What is cauing this the wrong version of Ruby to be used here, and how do I fix it? Other Context and Failed Fixes Running rbenv versions gives:

Install Rbenv using Ansible

情到浓时终转凉″ 提交于 2020-01-15 21:03:20
问题 I am trying to install Rbenv on my server using Ansible but getting this error: TASK: [rbenv | create temporary directory] * ** * ** * ** * ** * ** * **** fatal: [localhost] => Conditional expression must evaluate to True or False: is_failed($rbuild_present) FATAL: all hosts have already failed -- aborting My playbook is: --- - name: rbenv | update rbenv repo git: repo=git://github.com/sstephenson/rbenv.git dest=$rbenv_root version=v0.4.0 - name: rbenv | add rbenv to path file: path=/usr

Install Rbenv using Ansible

≯℡__Kan透↙ 提交于 2020-01-15 21:01:45
问题 I am trying to install Rbenv on my server using Ansible but getting this error: TASK: [rbenv | create temporary directory] * ** * ** * ** * ** * ** * **** fatal: [localhost] => Conditional expression must evaluate to True or False: is_failed($rbuild_present) FATAL: all hosts have already failed -- aborting My playbook is: --- - name: rbenv | update rbenv repo git: repo=git://github.com/sstephenson/rbenv.git dest=$rbenv_root version=v0.4.0 - name: rbenv | add rbenv to path file: path=/usr

Why do I need to add ~/.rbenv/bin to my path?

旧城冷巷雨未停 提交于 2020-01-14 14:29:07
问题 I read in "rbenv can't change global ruby version" that I need to add ~/.rbenv/bin to my PATH for rbenv to work. It's also mentioned in the documentation but that directory doesn't exist as shown below: ➜ ~ ls -a ~/.rbenv/ . .. plugins shims version versions So why do I need to add a directory that doesn't exist to my path for rbenv to work? Edit: @theTinMan, I've tried uninstall and reinstalling, but I still don't have a ~/.rbenv/bin path. Where are you seeing in the documentation that it

rbenv build failed on Ubuntu 14.04

浪尽此生 提交于 2020-01-11 18:04:59
问题 I've successfully installed rbenv (along with the build tools) on my Ubuntu 14.04 desktop, and that appears to be working fine, but as soon as I try to install ruby 2.1.1, the build fails: daniel@grape:~$ rbenv install 2.1.1 Downloading yaml-0.1.6.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net/5fe00cda18ca5daeb43762b80c38e06e Installing yaml-0.1.6... Installed yaml-0.1.6 to /home/daniel/.rbenv/versions/2.1.1 Downloading ruby-2.1.1.tar.gz... -> http://dqw8nmjcqpjn7.cloudfront.net

Bundler in deployment mode does not find Gems

有些话、适合烂在心里 提交于 2020-01-06 19:49:13
问题 I was heavily struggling with my Capistrano Setup, when my Hoster migrated the server: Capistrano3 deploy fails after migrating the server One thing I ran into that used to work just fine on the old machine and now seems to be a mess is bundler: I could successfully run bundler through Capistrano: cap staging bundler:install This resulted in the following command on the server /usr/bin/env bundle install --binstubs \ /var/www/mydomain.com/subdomains/dev/shared/bin \ --path /var/www/mydomain

Ruby OpenSSL Install on Mac 10.10 Yosemite

给你一囗甜甜゛ 提交于 2020-01-06 13:54:43
问题 Using brew I go though the normal install process to get rbenv and Ruby installed. Everything goes smoothly but it is soon apparent Ruby did not install with openssl onboard. The only thing that seems to allow rbenv to auto install openssl during the ruby install is to use this: sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include /usr/include Is this a bug in rbenv or brew that needs fixing? 回答1: There's a long thread

Rbenv permission denied issue

一个人想着一个人 提交于 2020-01-04 04:21:06
问题 I have trouble getting my Rails app running after I deployed this to my DO droplet. I deployed (and installed everything including rbenv ) following this guide. Rbenv seems to be installed properly but app is not running and nginx error log says " cannot execute /root/.rbenv/shims/ruby permission denied (13) " I can not get the sense of this error, hope anyone can help with that. 回答1: Looks like rbenv's installed under root. It should probably be installed under your (or your app user's) home

Unicorn service upstart script throws “-su: bundle: command not found”

眉间皱痕 提交于 2020-01-01 14:36:09
问题 I recently created a VPS on DigitalOcean to host a rails app. I followed their guide to setup Unicorn with my application. https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-unicorn-and-nginx-on-ubuntu-14-04 A problem occurred when I ran sudo service unicorn_appxyz start . The error given was -su: bundle: command not found I traced the init.d script and pasted the evaluated server start up command in terminal and it works fine when executed under the user joe (the