Installing Bundle for Ruby - ruby-on-rails

I am trying to install bundle and I keep on getting errors about specific gems not being installed. For example, my byebug debugger was not installed I had to install that, and my eventmachine was not installed, and now my json is not installed I install json and when I run
#bundle install
I still get the:
An error occurred while installing json (1..7.7), and Bundler cannot continue.
Make sure that 'gem install json -v '1.7.7' succeeds before bundling
How can I successfully install bundle?
edit: gem install json -v '1.7.7' I get the following error:
new error message

Related

Heroku json gem install fails

I could not push my app to heroku and when I run I get the following error
An error occurred while installing json (1.8.3), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.3'` succeeds before bundling.
I could not manually install the gem either because when I do
gem install json -v '1.8.3'
Fetching: json-1.8.3.gem (100%)
ERROR: While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /var/lib/gems/2.3.0 directory.
and I cannot access sudo on Heroku
What do I do?
Update the Gemlock file and try again...!
Or remove it completely so it can install all the gems from scratch

Ruby - "bundle install" json gem error

I am working on Windows 10. I successfully installed Ruby, MSYS2 and DevKit, but after trying to run the following command:
bundle install
it throws me an error
An error occurred while installing json (1.8.1), and Bundler cannot continue.
Make sure that `gem install json -v '1.8.1'` succeeds before bundling.
I tried the solution with
gem install json -v '1.8.1'
but it still doesn't work for me.
Does anybody knows how i can fix the error?

An error occurred while installing json (1.8.6), and Bundler cannot continue

I tried to run the bundle install command and I got the following errors. After reading some stackoverflow posts, I also ran bundle update.
I am still getting the issue of json ~ 1.8.6 gem (I guess).
An error occurred while installing json (1.8.6), and Bundler cannot
continue. Make sure that gem install json -v '1.8.6' succeeds before
bundling.
Here the issue is not getting installation done properly.
Older versions of json gem have some incompatibilities with newer ruby. Try to update json gem bundle update json
This can be solved by doing the following
1. Installing the ruby development environment by running the following command(for Linux machines).
sudo apt-get install ruby
ruby -e 'puts RUBY_VERSION[/\d+\.\d+/]' -dev
Read this post for more details.
2. Now install the json -v '1.8.6' gem by running the following command.
sudo gem install json -v '1.8.6'
This should solve the issue. Now try running bundle update and bundle install and it should work fine.
Thanks #TomLord and #Haider Ali for your inputs.

Error on bundle install

I am trying to run my Ruby application.
I am running the bundle install command, however get the error-
An error occurred while installing libv8 (3.1.16.14.3), and Bundler cannot continue.
Make sure that 'gem install libv8 -v '3.1.16.14.3' succeeds before bundling.
So then I tried-
gem install --version '=3.16.14.3' libv8
and get the error-
Error installing libv8:
ERROR: Failed to build gem native extension.
This is required to run the application however I am not sure how to resolve this?
RUBYOPT=-rrubygems gem install libv8 -v '3.16.14.3'

Error when installing json 1.7.5 in rails

I am trying to install latest version of json using gem bundle install and it results in an error. I am trying to install within aptana studio 3 workspace.
I get the following error - can anyone throw some light on this issue -
Installing json (1.7.5) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
An error occurred while installing json (1.7.5), and Bundler cannot continue.
Make sure that gem install json -v '1.7.5' succeeds before bundling.
After seeing this error I just ran install json and it runs fine but json doesnt seem to install.
--
Sandesh
I had the same json 1.7.5 error while creating or doing bundle install on a new rails 3.2.9 app on ruby 1.9.3. This is what worked for me:
Get the latest version of Xcode (4.5.2 in my case). Open up Xcode. Go to Preferences. Go to downloads, and click INSTALL on the Command Line Tools.
In your terminal do: rvm reinstall 1.9.3
Create your new rails app, you will get the same json 1.7.5 error, but it's ok. Then open up the app and go to your Gemfile. At the top of the file, change source 'https://rubygems.org' to source 'http://rubygems.org'
run gem install json -v '1.7.5'
run bundle install
This should work, as it did in my case!
I forgot about it sorry. Please check these questions:
When I try sudo gem install json I get the following error
Why won't bundler install the json 1.7.4 gem on OS X 10.8?
Probably you need to install XCode Command Line tools.

Resources