Error installing mailcatcher | Windows 10 - ruby-on-rails

I am trying to install mailcatcher gem on my Windows 10, but I am getting the following error:
Error installing mailcatcher: ERROR: Failed to build gem native extension.
I am using ruby version 3.2.1 and after running the command gem install mailcatcher in cmd I get the above error and I have no idea how to get it solved.
My intention is to install mailcatcher.
I tried googling and watching some youtube videos, everything was working well in the tutorials but not for me.

Related

I'm getting "Error 403" when installing rails

I'm trying to install rails -v 5.2.2 on wsl ubuntu 18.04.
Im met with following error:
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Forbidden 403 (https://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.3-x64-unknown.gemspec.rz)
I'm relatively new to bash and I'm not sure what to do at this point, as google failed me. Help? :)
I had the same issue with -v 5.2.3. What worked for me was updating RubyGems with:
gem update --system
Then again:
gem install rails --version 5.2.3
and no issues this time.
Solution 1: As proposed by #Unixmonkey downloading the gem on separate machine with no restrictions and copying the gemfile worked.
Solution 2: Installing ruby through RVM and trusting its certificates

ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) bad response Forbidden 403

when i run gem install rails -v 5.1.4
I get the following error
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
bad response Forbidden 403 (http://api.rubygems.org/quick/Marshal.4.8/nokogiri-1.13.3-x64-unknown.gemspec.rz)
Thank you for your ahead of time!
I got this problem due to TWO factors:
I am running everything inside an M1 architecture
I am running gem install inside an rbenv controlled directory
I will assume you are in the same spot like me (Specially the M1 architecture).
I was able to install nokogiri (and other gems) by using the arch command:
$ arch -x86_64 gem install nokogiri
Successfully installed nokogiri-1.12.5-x86_64-darwin
Parsing documentation for nokogiri-1.12.5-x86_64-darwin
Done installing documentation for nokogiri after 2 seconds
1 gem installed
I hope it works for you too.

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. error in set up of rails server

p.s. : I am using ruby version 2.2.4
when i run the command in other directory like
letsventure-MacBook-Pro:~ letsventure$ rails -v
#~> Rails 5.0.1
it gives the correct output of rails version .
while in project directory it gives output like this
letsventure-MacBook-Pro:lv2 letsventure$ rails -v
Could not find mysql2-0.4.10 in any of the sources Run bundle
install to install missing gems.
so i run bundle install
I got this error
This is image link to see error
can anyone help me to solve this problem

Getting error (Gem::RemoteFetcher::UnknownHostError) while installing Rails or gem update

I want to install Ruby on Rails in my laptop using Ubuntu 18.04 LTS. I've installed Ruby, but when I trying to install Rails with sudo gem install rails, i'm getting error message
ERROR: While executing gem ... (Gem::RemoteFetcher::UnknownHostError)
no such name (https://api.rubygems.org/quick/Marshal.4.8/websocket- extensions-0.1.3.gemspec.rz)
Can anyone help me?
Disable IPv6 and retry. It should work.

after entering 'bundle install' on command line I get "make sure that 'gem install json -v 1.8.2' succeeds before bundling"

I've been following this lynda tutorial online on 'Ruby on Rails.' I've downloaded Ruby, devkit and rails on to my computer. After I created sample_app and tried to run bundle install, but it keeps telling me make sure that 'gem install json -v 1.8.2' succeeds before bundling" I try to run gem install json -v 1.8.2 and other variations including "gem install json -v 1.8.2 --verbose", "gem install json --platform=ruby" but everytime I get an error saying that it failed to build gem native extensions. The same thing happened when I was following the downloading devkit tutorial and I tried to install JSON as per its instructions. I've tried using gem update system 2.3.0 but that doesn't work either. What could be wrong?
Typically this will happen on Windows because not all the commands are availible. I would recommended that you either use VirtualBox with an Ubuntu image or use Cloud9 IDE.
I just experienced the same problem myself. I am working my way from Windows to a Mac but not quite there just yet. Windows is ok for Rails development (been doing so for 3 years) although it does present some unique issues occasionally. Check out the following link to downgrade RubyGems to 1.8.29 and then try running bundle install again.
Issue with Ruby gem install

Resources