I have developed a gem called web_scraper. When I am trying to publish it to rubygems.org I am getting below issue.
> You do not have permission to push to this gem. Ask an owner to add
> you with: gem owner web_scraper --add <email>
Here is the output of gem env
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.1 (2016-04-26 patchlevel 112) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/bhaskar/.rvm/gems/ruby-2.3.1
- USER INSTALLATION DIRECTORY: /home/bhaskar/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /home/bhaskar/.rvm/rubies/ruby-2.3.1/bin/ruby
- EXECUTABLE DIRECTORY: /home/bhaskar/.rvm/gems/ruby-2.3.1/bin
- SPEC CACHE DIRECTORY: /home/bhaskar/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/bhaskar/.rvm/gems/ruby-2.3.1
- /home/bhaskar/.rvm/gems/ruby-2.3.1#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /home/bhaskar/.rvm/gems/ruby-2.3.1/bin
- /home/bhaskar/.rvm/gems/ruby-2.3.1#global/bin
- /home/bhaskar/.rvm/rubies/ruby-2.3.1/bin
- /home/bhaskar/.rvm/bin
- /home/bhaskar/.nvm/versions/node/v6.9.3/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
- /snap/bin
I have proper rubygems account and API key also available.
How to resolve this issue?
Your gem name needs to be unused on RubyGems, you can use the search on https://rubygems.org/ to check whether the gem exists, in this case, it does, so you'll need to rename your gem to use a name that isn't in use.
The answer is right there in the message:
You do not have permission to push to this gem. Ask an owner to add
you with: gem owner web_scraper --add <email>
You need to ask the owner of the web_scraper gem to add you as a developer to allow you to make updates to the gem.
Related
I installed the Hanami gem and ran hanami new bookshelf but got
zsh: command not found: hanami
I'm running:
macos 10.15.1
homebrew: 2.1.16
ruby: 2.6.5p114
rubygem: 3.0.6
hanami: 1.3.3
Does anyone know how to resolve this?
Same issue here; with a fresh installed MacOS Sierra, ruby & etc.
gem env output:
RubyGems Environment:
- RUBYGEMS VERSION: 3.0.6
- RUBY VERSION: 2.6.5 (2019-10-01 patchlevel 114) [x86_64-darwin16]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.6.0
- USER INSTALLATION DIRECTORY: /Users/captainhusaynpenguin/.gem/ruby/2.6.0
- RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
- GIT EXECUTABLE: /usr/local/bin/git
- EXECUTABLE DIRECTORY: /usr/local/lib/ruby/gems/2.6.0/bin
- SPEC CACHE DIRECTORY: /Users/captainhusaynpenguin/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.6.5/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-16
- GEM PATHS:
- /usr/local/lib/ruby/gems/2.6.0
- /Users/captainhusaynpenguin/.gem/ruby/2.6.0
- /usr/local/Cellar/ruby/2.6.5/lib/ruby/gems/2.6.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/opt/ruby/bin
- /usr/local/opt/ruby/bin
- /usr/local/opt/ruby/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
and finally, with the answer to a similar question by rubiii:
adding the EXECUTABLE DIRECTORY to PATH was the solution.
Quick command from above example:
export PATH=$PATH:/usr/local/lib/ruby/gems/2.6.0/bin
For permanently adding it to path:
sudo nano /etc/paths
was the fix.
Configuring a new machine (Mac OS Mojave - Version 10.14.2).
After installing ruby with rbenv. I'm trying to install some gem and running :
gem install rake bundler rspec rubocop pry pry-byebug hub colored octoki
But its give me the following error :
ERROR: While executing gem ... (TypeError)
incompatible marshal file format (can't be read)
format version 4.8 required; 60.33 given
Here is my Gem env :
RubyGems Environment:
- RUBYGEMS VERSION: 2.7.6
- RUBY VERSION: 2.5.3 (2018-10-18 patchlevel 105) [x86_64-darwin18]
- INSTALLATION DIRECTORY: /Users/elise/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0
- USER INSTALLATION DIRECTORY: /Users/elise/.gem/ruby/2.5.0
- RUBY EXECUTABLE: /Users/elise/.rbenv/versions/2.5.3/bin/ruby
- EXECUTABLE DIRECTORY: /Users/elise/.rbenv/versions/2.5.3/bin
- SPEC CACHE DIRECTORY: /Users/elise/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/elise/.rbenv/versions/2.5.3/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-18
- GEM PATHS:
- /Users/elise/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0
- /Users/elise/.gem/ruby/2.5.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["http://gems.rubyforge.org/", "http://gems.github.com"]
- :benchmark => false
- "gem" => "--no-document"
- REMOTE SOURCES:
- http://gems.rubyforge.org/
- http://gems.github.com
- SHELL PATH:
- /Users/elise/.rbenv/versions/2.5.3/bin
- /usr/local/Cellar/rbenv/1.1.1/libexec
- ./bin
- ./node_modules/.bin
- /Users/elise/.rbenv/shims
- /Users/elise/.rbenv/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/local/sbin
Does anyone know where this bug comes from?
Thanks for the help.
You have only enable very old (and not maintained) remote gem sources in your gem configuration. This might be caused by some old migrated configuration or by following some very old and outdated advice.
To fix this, you first need to remove the outdated gem sources and then add the only one which should be currently used. For that, you can run the following command from your Terminal:
gem sources --remove http://gems.github.com/
gem sources --remove http://gems.rubyforge.org/
gem sources --add https://rubygems.org/
You have to remove all the gem sources you have and add https://rubygems.org/ instead. Note that http://gems.rubyforge.org/ and http://gems.github.com are permanently dead and should be removed. You can list your sources by running:
gem sources
You should get something like this:
*** CURRENT SOURCES ***
//gems.rubyforge.org/
//gems.github.com
1) Delete all sources:
gem sources -r http://gems.rubyforge.org/
gem sources -r http://gems.github.com
2) Add the right source:
gem sources -a https://rubygems.org/
Also, never sudo gem install
Hope this helps!
Can anyone help me walk through what I'm doing wrong here? This is my first go w/ Ruby so any help would be appreciated:
I've installed RVM and executing it through Terminal
I'm trying to run the script detailed in this post from GitHub:
https://github.com/michiels/helpscout-export
I was successfully able to install the gem 'HelpScout'
When I run ruby export.rb MY_api_key I get this error message:
ruby: No such file or directory -- export.rb (LoadError)
Anyone have any insight? Here's my current gem environment:
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.8
- RUBY VERSION: 2.0.0 (2013-11-22 patchlevel 353) [x86_64-darwin15.0.0]
- INSTALLATION DIRECTORY: /Users/stevekrause/.rvm/gems/ruby-2.0.0-p353
- RUBY EXECUTABLE: /Users/stevekrause/.rvm/rubies/ruby-2.0.0-p353/bin/ruby
- EXECUTABLE DIRECTORY: /Users/stevekrause/.rvm/gems/ruby-2.0.0-p353/bin
- SPEC CACHE DIRECTORY: /Users/stevekrause/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Users/stevekrause/.rvm/rubies/ruby-2.0.0-p353/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-15
- GEM PATHS:
- /Users/stevekrause/.rvm/gems/ruby-2.0.0-p353
- /Users/stevekrause/.rvm/gems/ruby-2.0.0-p353#global
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/stevekrause/.rvm/gems/ruby-2.0.0-p353/bin
- /Users/stevekrause/.rvm/gems/ruby-2.0.0-p353#global/bin
- /Users/stevekrause/.rvm/rubies/ruby-2.0.0-p353/bin
- /Users/stevekrause/.rvm/bin
- /Library/Frameworks/Python.framework/Versions/3.5/bin
- /Users/stevekrause/anaconda/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
I am having troubles with jekyll. I have Ubuntu 14.04. I've tried to deploy a static site with rack-jekyll and I ended up messing up with my ruby and jekyll installation files.
I've already made ruby work just fine (I used rbenv to install version 2.2.3) but I still have problems with jekyll. When I type jekyll new smth or jekyll serve it shows:
bash: /usr/bin/jekyll: No such file or directory
I have already installed jekyll but it still shows that. From what I searched it might be a problem with some path.
Here are some information that might help to find a solution:
rafael#rafael-K56CM:~$ which jekyll
/home/rafael/.rbenv/shims/jekyll
rafael#rafael-K56CM:~$ sudo find / -name jekyll
[sudo] password for rafael:
/home/rafael/.rbenv/shims/jekyll
/home/rafael/.rbenv/versions/2.2.3/bin/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/bin/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-2.5.3/lib/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-coffeescript-1.0.1/lib/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-sass-converter-1.3.0/lib/jekyll
/home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/jekyll-watch-1.2.1/lib/jekyll
rafael#rafael-K56CM:~$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.8
- RUBY VERSION: 2.2.3 (2015-08-18 patchlevel 173) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0
- RUBY EXECUTABLE: /home/rafael/.rbenv/versions/2.2.3/bin/ruby
- EXECUTABLE DIRECTORY: /home/rafael/.rbenv/versions/2.2.3/bin
- SPEC CACHE DIRECTORY: /home/rafael/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /home/rafael/.rbenv/versions/2.2.3/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/rafael/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0
- /home/rafael/.gem/ruby/2.2.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["https://rubygems.org/", "http://rubygems.org/"]
- "gem" => "--no-ri --no-rdoc"
- REMOTE SOURCES:
- https://rubygems.org/
- http://rubygems.org/
- SHELL PATH:
- /home/rafael/.rbenv/versions/2.2.3/bin
- /usr/lib/rbenv/libexec
- /home/rafael/.rbenv/shims
- /home/rafael/.rbenv/bin
- /home/rafael/.rbenv/shims
- /home/rafael/.rbenv/bin
- /usr/local/heroku/bin
- /home/rafael/.rbenv/plugins/ruby-build/bin
- /home/rafael/.rbenv/shims
- /home/rafael/.rbenv/bin
- /usr/local/sbin
- /usr/local/bin
- /usr/sbin
- /usr/bin
- /sbin
- /bin
- /usr/games
- /usr/local/games
- /home/rafael/.rvm/bin
- /home/rafael/.rvm/bin
This issue can be solved by creating a symbolic link to the jekyll executable:
sudo ln -s /path/to/project/gems/bin/jekyll /usr/bin/jekyll
Use the which command to identify where the jekyll executable is installed.
I am on RHEL 6, and have built Ruby from source and installed into /usr/local.
The server I am on does not have outside internet access, EXCEPT to access Rubygems.org. That is the only outside connection it is permitted to make. This is a corporate security restriction and there is nothing I can do, so please don't say 'use rvm'. I would if I could...
I need to run bundle install as a certain user, ciwasadm. But when I do, the terminal just hangs. When I run bundle install or gem install whatever as my username, wannia1, I am able to connect to Rubygems.org and get wahtever I need.
For some reason, the hanging only occurs when I am sudo'ed into ciwasadm. The Ruby installation for both users is working and I can run ruby files in the command line. I just don't understand why bundler is any different.
Running gem env for ciwasadm returns:
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.8
- RUBY VERSION: 2.0.0 (2015-04-13 patchlevel 645) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.0.0
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- SPEC CACHE DIRECTORY: /home/ciwasadm/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/2.0.0
- /home/ciwasadm/.gem/ruby/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /sbin
- /bin
- /usr/sbin
- /usr/bin
- /opt/groovy-1.8.3/bin
Running gem env for wannia returns:
RubyGems Environment:
- RUBYGEMS VERSION: 2.4.8
- RUBY VERSION: 2.0.0 (2015-04-13 patchlevel 645) [x86_64-linux]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/2.0.0
- RUBY EXECUTABLE: /usr/local/bin/ruby
- EXECUTABLE DIRECTORY: /usr/local/bin
- SPEC CACHE DIRECTORY: /home/wannia1/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /usr/local/etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /usr/local/lib/ruby/gems/2.0.0
- /home/wannia1/.gem/ruby/2.0.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /usr/lib64/qt-3.3/bin
- /usr/local/bin
- /bin
- /usr/bin
- /usr/local/sbin
- /usr/sbin
- /sbin
- /opt/groovy-1.8.3/bin
- /home/wannia1/bin
I'll post my solution here with the hopes that it helps someone else in the future.
Bundler was hanging because it could not reach the rubygems.org server. This is because a proxy was required, but had not been set.
I was able to run export http_proxy=<insert proxy info here> in my bash shell, and then was able to dial out.