Thursday, March 10, 2011

Setting up Github and RubyGems Profile for My Stuff

Set up Github

I found that the git configuration is expecting me to make a "ethrernet" project: "./.git/config: url = git@github.com:haoqili/ethernet.git"

So I'm going to set up my github account, which I got a few weeks ago. I followed these github bootcamp instructions to get my SSH keys.

Yay! It's done! https://github.com/haoqili/ethernet

Committing to Github from computer
  1. make edits
  2. git status
  3. git add [the modified files]
  4. git commit -m "message here"
  5. git push will push to github!
Setup RubyGems Profile btw, gemcutter.org redirects to rubygems.org
  1. sudo gem update --system
  2. bundle install ~ this adds Gemfile.lock
  3. vim VERSION ~ if you don't already have a "VERSION" file
  4. git add VERSION ~ put in "0.0.0" in it
  5. git commit -m "added a VRESION"
  6. git push
  7. rake release
If you get this error message for rake release (see below), this is because you don't have a VERSION file with "0.0.0" in it:

(in /home/haoqili/Desktop/rails/ethernet)
Committing ethernet.gemspec
Pushing master to origin
Tagging v
Pushing v to origin
Generated: ethernet.gemspec
ethernet.gemspec is valid.
  Successfully built RubyGem
  Name: ethernet
  Version: 
  File: ethernet-.gem
Executing "gem push ./pkg/ethernet-.gem":
gem push ./pkg/ethernet-.gem
Pushing gem to https://rubygems.org...
There was a problem saving your gem: Number is invalid
rake aborted!
Command failed with status (1): [gem push ./pkg/ethernet-.gem...]

(See full trace by running task with --trace)

Search for project name on rubygems.org. I have http://rubygems.org/gems/ethernet

No comments:

Post a Comment