문제

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?

도움이 되었습니까?

해결책

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.

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top