Could not find json-1.8.1 in any of the sources (Bundler :: GemNotFound)

I run the following stack:

  • ruby 2.1.1p76 (version 2014-02-24 45161) [x86_64-linux]
  • RubyGems 2.2.2
  • Rails 4.1.0
  • Bundler Version 1.6.2

ubuntu runs apache

And I get the following error:

Could not find json-1.8.1 in any of the sources (Bundler :: GemNotFound)

When I search for json as follows:

$ gem list | grep json

json (1.8.1)
multi_json (1.9.2)

It is, but for some reason, the message from the Passenger is as follows:

Ruby (Rack) application cannot be started

Error message: Could not find json-1.8.1 in any of the sources (Bundler :: GemNotFound) Exception class: PhusionPassenger :: UnknownError

+4
source share
5 answers

Spring ( Rails), Gem/path. rails generate rspec:install json-1.8.1.

, , - , , , - bin/spring stop rails, Spring Gem-.

+5

rails generate model Mac OS X Yosemite. , gem update rails, "Nothing to update".

Rails 4.1.7 ruby ​​2.1.4p265 ( 2014-10-27 48166) [x86_64-darwin14.0].

+5

.

, pow , , rvm, .powenv rails :

# detect `$rvm_path`
if [ -z "${rvm_path:-}" ] && [ -x "${HOME:-}/.rvm/bin/rvm" ]
then rvm_path="${HOME:-}/.rvm"
fi
if [ -z "${rvm_path:-}" ] && [ -x "/usr/local/rvm/bin/rvm" ]
then rvm_path="/usr/local/rvm"
fi

# load environment of current project ruby
if
  [ -n "${rvm_path:-}" ] &&
  [ -x "${rvm_path:-}/bin/rvm" ] &&
  rvm_project_environment=`"${rvm_path:-}/bin/rvm" . do rvm env --path 2>/dev/null` &&
  [ -n "${rvm_project_environment:-}" ] &&
  [ -s "${rvm_project_environment:-}" ]
then
  echo "RVM loading: ${rvm_project_environment:-}"
  \. "${rvm_project_environment:-}"
else
  echo "RVM project not found at: $PWD"
fi

.

+1

script, unicorn_rails , , . --login hashbang script, .

0

rails mac yosemite

Execution ' rbenv rehashsolved it for me

0
source

Source: https://habr.com/ru/post/1537316/


All Articles