Install gem in local folder
You can try: gem install –user-install gem_name
You can try: gem install –user-install gem_name
I want to warn: There is a security purpose for using https over http. Try at first the other answers mentioned in this thread. Changing https to http in my Gemfile did the magic. Before I have to create the project with rails new APP –skip-bundle
When you do gem uninstall capybara it should give you a menu asking which one you want to uninstall. Alternatively use the -v option. gem uninstall capybara -v 1.1.4 Note you may need to sudo these commands if you’re not using rvm.
ActiveResource was an API added in Rails 2.x to support an XML (and later JSON) API so that Rails sites could “talk” to one another. It was a very hot topic when the idea of RESTful APIs made its way into the framework. Over time it became more of a novelty and infrequently maintained so … Read more
It looks it’s a temporary bug: https://twitter.com/mpapis/status/447926386314186752. The disable-binary option worked for me: rvm reinstall 2.1.1 –disable-binary EDIT – better solution I see that some people still have this problem. Today much better solution is to update RVM like this: rvm get stable The problem was caused by RVM – it had some paths hard-coded … Read more
I had to install the Command Line Tools in the latest Xcode-Version (4.3.1) and sudo gem install rails worked like a charm. To install Command Line Tools, go to Xcode Preferences > Downloads or use the following command in terminal (thx @Purell): xcode-select –install
The problem with the checked answer is that you must “require” the rubygem or it won’t work. Often this is undesireable because if you’re working with an executable gem, you don’t want to “require” it or you’ll get a bunch of warnings. This is a universal solution for executables and libs: spec = Gem::Specification.find_by_name(“cucumber”) gem_root … Read more
The answer for this can be found here here although it is unrelated to this question. Below is a snippet of the answer which works best. For Xcode 11 on macOS 10.14, this can happen even after installing Xcode and installing command-line tools and accepting the license with sudo xcode-select –install sudo xcodebuild -license accept … Read more
Homebrew is nice. However unlike brew and npm, gem does not make aliases in /usr/local/bin automatically. Solution I went for a very simple approach (as of March 2020): # Based on “`brew –prefix ruby`/bin” export PATH=/usr/local/opt/ruby/bin:$PATH # Based on “`gem environment gemdir`/bin” export PATH=/usr/local/lib/ruby/gems/3.0.0/bin:$PATH Add this to your .bashrc (or .bash_profile, .zshrc, etc.). That’s it! … Read more
Most people solve this by installing the rails gem first via gem install rails. If you refuse to do that for some reason, you can opt out of the automatic bundling that Rails attempts to do for you. This will work completely regardless of your ruby management system. mkdir myapp cd myapp echo “source :rubygems” … Read more