Questions tagged [chruby]

chruby is a command-line tool for changing the currently active Ruby version.

chruby is a command-line tool for changing the currently active Ruby version.

42 questions
2
votes
1 answer

Rails is using the system version of ruby instead of Chruby set default

I set my ruby default using Chruby ruby version control but when I try and rails new it is using my system version. How do I fix this? ~/workspace ❯❯❯ ruby -v ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin14] ~/workspace ❯❯❯ ruby…
phillipjones1
  • 327
  • 2
  • 11
2
votes
2 answers

chruby not changing to the proper version of ruby according to the value in .ruby-version on new terminal tab

I am using source /usr/local/opt/chruby/share/chruby/auto.sh to auto change ruby to the version in .ruby-version, but unfortunately this only works on cd. When I open an new tab in my mac terminal, it opens to the same directory I was in in the…
pixelearth
  • 13,674
  • 10
  • 62
  • 110
2
votes
1 answer

error compiling chruby install of Ruby 2.0.0

I initiated an install of an older version of Ruby with ruby-install ruby 2.0.0 compiling readline.c readline.c:1886:26: error: use of undeclared identifier 'Function' rl_pre_input_hook = (Function *)readline_pre_input_hook; …
Benjamin Dunphy
  • 869
  • 1
  • 9
  • 15
1
vote
1 answer

Why won't rbenv or chruby switch to an installed version of Ruby?

I'm trying to get Jekyll running on my Mac M1. This requires a Ruby install. I had everything working a couple days ago, but must have changed something and now I cannot make sense of why it's no longer working nor find a fix. Here are the pieces of…
JohnZ
  • 11
  • 2
1
vote
0 answers

Changing PATH in zsrhc depending on the selected ruby version

Is it possible that the PATH entries in the zshrc automatically adapt to the selected ruby version? At the moment the zshrc contains e.g. export PATH="/Users/mariopeischl/.gem/ruby/3.1.0/bin:$PATH" export…
1
vote
1 answer

Rails 5 production error: Cannot define multiple 'included' blocks for a Concern (ActiveSupport::Concern::MultipleIncludedBlocks)

I'm running into an error while deploying production (both remote and locally). Development runs just fine. /Users/nope/.gem/ruby/2.5.1/gems/activesupport- 5.1.6/lib/active_support/concern.rb:126:in `included': Cannot define multiple 'included'…
do0fusz
  • 43
  • 7
1
vote
3 answers

How can I get bundler to use the Ruby version set by chruby and .ruby-version?

I have the pleasure of setting up a development environment for an application running Ruby 1.8.7. Unfortunately bundler is not using the version of Ruby set in .ruby-version by chruby. Also, I have ruby "1.8.7" included in the Gemfile Whereas the…
Keith Pitty
  • 1,498
  • 1
  • 12
  • 22
1
vote
1 answer

How can I run chruby with Ansible?

I developed an Ansible role that installs chruby and another one that installs ruby using ruby-install. I would like to use chruby in my Ansible playbooks, but the chruby command is not available to the command and shell modules, even if chruby…
Marco Ferrari
  • 4,914
  • 5
  • 33
  • 53
1
vote
0 answers

capistrano with chruby looks for bundler in wrong ruby

I am trying to get a deploy working with capistrano 3 on a new server and ruby version managed by chruby. All the tests specified in the capistrano docs work fine. When I try to do a deploy it appears to be trying to find bundler in the system ruby…
giorgio
  • 2,115
  • 5
  • 23
  • 39
1
vote
1 answer

chruby and ruby not available when I use sudo

I have installed chruby on ubuntu 14.04 and installed ruby-install and installed ruby 2.1.1 into /opt/rubies/ I have put the following into /etc/profile.d/chruby.sh if [ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ]; then source…
giorgio
  • 2,115
  • 5
  • 23
  • 39
0
votes
0 answers

The 'chruby' command can't be found

I'm using Hackintosh on my HP laptop to run flutter apps on the iOS simulator. Everything was fine until I got an error saying that I need to update cocoa pods. When I tried to do so, it said that I don't have write permissions for the 'ruby'. Upon…
0
votes
0 answers

chruby installations failing

I am attempting to get ruby set up to work on an older project and running into an issue where I can not seem to get chruby to successfully install ruby 2.2.0 which I need for some of the packages in the existing project (ruby_dep-1.5.0). I am…
TMac
  • 107
  • 2
  • 9
0
votes
0 answers

MAMP Ruby vs macOS system Ruby

I am about to install a newer version of Ruby so I checked the following things- Which ruby /Applications/MAMP/Library/bin//ruby ruby - v 2.6 I don't like to use Mamp Ruby as I want to use a newer version of Ruby probably 2.7 (as it supports the…
Prithviraj Mitra
  • 11,002
  • 13
  • 58
  • 99
0
votes
1 answer

Setting ruby version separately with different app on Mac

I have just started working on a ruby project and I notice that I have to specify the ruby version to use globally. For instance, I am using chruby to change the ruby version to use and I can set it directly at this file called .zshrc. But if I have…
terrer
  • 25
  • 4
0
votes
1 answer

Issues installing/updating Bundler

I have tried this a number of different ways. First I tried with RVM and it was just error after error and missing dependencies. Then I tried Rbenv and it was very much the same. Now, I have a combo of chruby and ruby-install to handle my versions…
arcaderob
  • 481
  • 1
  • 7
  • 21