Question

I am trying to push into rubygems.orge a simple gem following this tutorial. Basically I am using bundler and I have write a simple Hello World class. Then, I try to push the gem as follows:

bundle gem my_first_gem
gem build my_first_gem-0.0.1.gem

and I get:

Signed in.
Pushing gem to https://rubygems.org...
Repushing of gem versions is not allowed.
Please use `gem yank` to remove bad gem releases.

So, I have checked and there is already a gem with such name. So, is there an easy way to rename the gem I have including changing the gem name in all generate by bulder files:

enter image description here

or if I should rename the files by hand, could you tell which are the critical ones?

Was it helpful?

Solution

Instead of renaming files by hand. As it is just a tutorial gem, I would suggest you to create a new gem with

bundle gem gotqn_first_gem

and just move your HelloWorld class in lib. And follow the rest of the commands suggested in Railscasts.

OTHER TIPS

Don't forget that after renaming you need to call git add -A to update your files list.

The reason for that is because (unless that you have changed) your my_first_gem.gemspec have a line like that:

spec.files         = `git ls-files -z`.split("\x0")

So, when you call gem build my_first_gem-0.0.1.gem, the above command will search for your older files and ignore the renamed ones.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top