gem update --system error in bash for Windows - ruby-on-rails

Using bash on windows. I'm stuck at configuring my environment to get started with ruby on rails. I've installed the ruby and rails but still caught in problems. Details mentioned below
Executed commands and their result is pasted below.
ruby -v
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
gem install bundler
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
gem update --system
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
rails s
Rails 2.4.0 `<main>': undefined method `activate_bin_path' for Gem:Module (NoMethodError)**
So actually what is the problem?

Related

Issue on Installing Ruby On Rails for specific version on Ubuntu 18.04

I had installed Ruby at the version of 2.7.0 and Gem at the version of 3.1.2 when I used the command " gem install rails " it shows an error like this..
Log:
ax#shivvv:~$ sudo gem install rails
[sudo] password for ax:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
ax#shivvv:~$
Help me to find it..

Trouble installing Rails on MacOS

I have Ruby 5.2.3, Homebrew, Xcode, and zlib 1.2.11 installed but I am still running into this error:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
I've tried running
gem install rails -v 5.2.3
gem install rails
and
sudo gem install rails
and all give the same error.

Installing Rails with compiled version of Ruby (Debian)

I have a Debian 8 Jessie server and I've compiled Ruby sources (https://www.ruby-lang.org/en/documentation/installation/#building-from-source).
When I check the version of ruby with ruby -v, I have a correct output
ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
However, when I run the following command:
gem install rails, I have the following error message:
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
Does anyone have the solution?

How can I install using gem when I keep getting this zlib error?

I recently installed rails 4.1.8 from the repos in ubuntu. I installed ruby 2.0.0. I want to update to rails 4.2.0. I rvm'd to ruby 2.0.0. I try to update rails using
gem install rails -v 4.2.0
but receive this error
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass
zlib1g-dev is already installed. I'm not sure what to do.
Thanks
I decided to simply uninstall everyting, a la
aptitude purge rails
Then start from scratch using this guide

gem install rails fails with "typeerror no implicit conversion of nil into String"

I'm trying to install the rails gem by executing gem install rails and I'm getting the following error:
ERROR: While executing gem ... (TypeError)
no implicit conversion of nil into String
Installed ruby versions using rbenv:
$ rbenv versions
system
* 2.3.1 (set by /Users/Michael/.rbenv/version)
I'm on OS X 10.9.5

Resources