Wanted to install a gem from custom gem repo. Here are the steps which i followed
1. Created a gem and copied it to gems folder under gems_repo.
2. Run the command gem generate_index. This command created some files. I copied the files to http://example.com Attaching a screen shot of the same.
After running the command to install the gem , it gave me following error
gem install some_gem_name --source 'http://example.com/gems_repo'
ERROR: Could not find a valid gem 'some_gem_name' (>= 0), here is why:
Unable to download data from http://example.com/gems_repo/ - server did not return a valid file (http://example.com/gems_repo/specs.4.8.gz)
I have tried gem update --system command and tried to install the gem again. It gave the same error as above. If you look at the screen shot the file for which the command is complaining is already there.
The ruby version is ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-linux] and gem -v = 2.6.10
Can you please help me fix this error
Related
I am trying to install fat free crm on a Windows 10 machine, but so far I have been unsuccessful. This is my latest attempt. Any help will be greatly appreciated.
Running bundler install gives me these messages:
Bundler 2.3.7 is running, but your lockfile was generated with 2.3.10. Installing Bundler 2.3.10 and restarting using that version.
Fetching gem metadata from https://rubygems.org/.
Fetching bundler 2.3.10
Installing bundler 2.3.10
Fetching gem metadata from https://rubygems.org/.........
Lots of successfully installed gems later:
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory:
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/3.1.0 -r
./siteconf20221119-16700-fgt0qd.rb extconf.rb
creating Makefile
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/builder.rb:12:in
`build_libv8!': failed to download node 16.10.0 (Libv8::Node::BuilderError)
from
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node/location.rb:30:in
`install!'
from extconf.rb:9:in `<main>'
==== in
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/ext/libv8-node
==== running
C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/libv8-node-16.10.0.0/libexec/download-node
extconf failed, exit code 1
My node version is v18.12.1, by the way. (Do I need an older one?)
Anyway, here is the exact sequence of actions before running bundler install inside my local git clone of fat_free_crm:
First, the repository I am using:
https://github.com/fatfreecrm/fat_free_crm
My Ruby version:
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x64-mingw-ucrt]
For a fresh start, I uninstall all gems, including rails:
gem uninstall -aIx
The latest commit on the bin folder says: Upgrade to Rails 6 so I install the latest rails 6 version on my machine:
gem install rails -v 6.1.7
I clone the repository from github:
git clone https://github.com/fatfreecrm/fat_free_crm.git
Since I am using sqlite3 for this, I comment out all other db gems in the Gemfile and only leave this one:
gem 'sqlite3', '~> 1.4.0'
Then, I copy database.sqlite.yml into database.yml.
Then, I run bundler install from within the directory fat_free_crm, which gives me this:
Ensure you have either installed the shared-mime-info package for your distribution, or
obtain a version of freedesktop.org.xml and set FREEDESKTOP_MIME_TYPES_PATH to the location of that file.
I (hopefully) solved that problem with this stackoverflow solution: Error installing ruby on rails on windows 10
Afterwards, I run bundler install again, which gives the error messages that I mentioned at the top of my description.
Any help will be greatly appreciated.
P.S.: I am trying to get back into Ruby on Rails after a long break, so please forgive me, if I made any stupid mistakes.
Error installing sqlite3, failed to build native gem extension.
Running on Windows 10.
Following a codeacademy tutorial, I successfully installed Ruby on Rails (ruby version : 2.3.3p222 (2016-11-21 revision 56859) [i386-mingw32) (rails version : 5.1.7). Running 'bundle install' popped up with an error saying I needed to download SQlite.
No problem, I go to the SQLite website and download sqlite3. Re-running 'bundle install', I get an error saying :
'An error occurred while installing sqlite3 (1.4.0), and Bundler cannot continue.
Make sure that gem install sqlite3 -v '1.4.0' --source 'https://rubygems.org/'
succeeds before bundling.'
Following the suggestion, I run this command and get the following error:
'sqlite3.h is missing. Install SQLite3 from http://www.sqlite.org/ first. Could not create Makefile..'
I have download sqlite3 from the website, there is no sqlite3.h file in the folders. My google and SO searches have been fruitless.
Can you try the steps here:
https://medium.com/#declancronje/installing-and-troubleshooting-ruby-on-rails-sqlite3-windows-10-fix-87c8886d03b
Github thread - https://github.com/sparklemotion/sqlite3-ruby/issues/224#issuecomment-482612096
Go to Gemfile and replace gem'sqlite3' to gem 'sqlite3', '< 1.4'
In my gemfile I have:
gem 'capistrano-cook', github: "subsis/capistrano-cook"
Here is the error log when running bundle install in the ruby/rails console: http://pastie.org/private/aftbq3rukjdthua4lfjzbw
C:\rails\app>bundle install
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
C:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/capistrano-cook-d0d4f904a443/capistr
ano-cook.gemspec:17:in ``': No such file or directory - git ls-files (Errno::ENO
In Git Bash console when running bundle install it works fine. But when requiring the gem in the capistrano deploy file it is not loaded. Seems like it is not installed after all.
The bundler gem is version 1.2.3
C:\rails\app>gem show capistrano-cook
ERROR: While executing gem ... (RuntimeError)
Unknown command show
C:\rails\app>bundle show capistrano-cook
C:/Ruby193/lib/ruby/gems/1.9.1/bundler/gems/capistrano-cook-d0d4f904a443
C:\rails\app>
Try:
gem 'capistrano-cook', :git => 'git://github.com/subsis/capistrano-cook.git'
hiii
i am trying to update my gem file. Current version of gem is 1.8.5
When i am trying to update it using command " gem install rubygems-update -v 1.8.5 " it is giving following error
**
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
SocketError: getaddrinfo: Name or service not known
(http://rubygems.org/gems/rubygems-update-1.8.5.gem)
**
I am working on ubuntu 10.04
also i tried to update using command " gem update --system "
it is giving the error as below
Updating rubygems-update
**
ERROR: While executing gem ... (Gem::GemNotFoundException)
Could not find a valid gem 'rubygems-update' (1.8.6) locally or in
a repository
**
i also tried the solution given on the link http://lightyearsoftware.com/2009/07/updating-rubygems-to-recent-1-3-x/
please help me to resolve the problem..
If you are under Windows 7, run the command prompt as Administrator.
Read this thread. The error reported is the same of yours.
Try to apply the Google DNS configuration to your connection.
Otherwise you can try to install locally the gem, downloading it on rubygems.org. After this, in the directory you downloaded the gem, try to install it locally with the command: gem install gem_name --local
I also had this error. I resolved it with
gem uninstall rubygems-update
(you may need to be sudo) and then reinstalled with
gem install rubygems-update
now it's working fine, hope this is helpful
Try this:
Manually uninstall the gem you want to remove: gem uninstall [gemToUinistall]
Download the gem manually from http://rubygems.org/
try to install the gem from local : gem install [gemToInstall]
I have Ruby 1.8.7 and Ruby 1.9.2 installed on my Windows Machine.
In my console when I do ruby -v it gives me Ruby 1.8.7
Now when I try
gem install rails -v 2.3.8
I get this error
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: could not find gem rails locally or in a repository
My RubyGems version show 1.3.5 so I tried to update it
gem update --system
I get this error
Updating RubyGems
ERROR: http://gems.rubyforge.org/ does not appear to be a repository
ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError)
Errno::E10013: An attempt was made to access a socket in a way forbidden by
its access permissions. - connect(2) (http://gems.rubyforge.org/yaml)`
What is going wrong?
Give this a try.
gem sources
That will show you what sources you are using.
gem sources -a http://rubygems.org
gem sources -a http://gems.github.com
gem sources -a http://gems.rubyforge.org/
Those will add the most used gem sources.
I got the same error, but when I tried to set the company's proxy with SET HTTP_PROXY, I got a problem because the proxy uses NTLM validation and I needed to specify my AD-Domin which won't work wit gem. The way I got around it was installing fiddler and starting it and then setting
SET HTTP_PROXY=http://localhost:8888
afterwards my gems installed like a charm!