Stuart Pontins
Stuart Pontins

Reputation: 285

What to do once you've edited a gemspec file?

I downloaded the latest file from github, edited the .gemspec file to require a gem I need; what do I then do to be able to use the gem? Do I have to bundle it with bundler to be able to use it?

Sorry if dumb question, but so confused right now... can't find much info especially on Rapidfire...

Upvotes: 1

Views: 445

Answers (2)

Leantraxxx
Leantraxxx

Reputation: 4606

  1. You need to fork the repository.
  2. Clone the forked repository and edit the gemspec: git clone [email protected]:code-mancers/rapidfire.git
  3. Commit your changes: git add .; git commit -m "whatever"
  4. Push your changes: git push origin master
  5. Edit the your project's Gemfile pointing the forked gem: gem 'rapidfire', github: 'your-user/rapidfire', branch: 'master'

Upvotes: 1

Leantraxxx
Leantraxxx

Reputation: 4606

You can do:

gem build path-of-the-gemspec-file

Then

gem install path-of-generated-gem-file

For example:

In the root path of your gem, you can do:

gem build my-gem.gempsec

Then:

gem install my-gem-0.1.0.gem

To see if the gem was installed:

gem list | grep my-gem

Upvotes: 1

Related Questions