Questions tagged [gemspecs]

The gemspec file defines a Gem::Specification object.

A gem consists of two things:

  1. some code
  2. a gemspec file

The gemspec file defines a Gem::Specification object. It contains the required information for a gem. Starting in RubyGems 2.0, a Specification can hold arbitrary metadata.

REQUIRED GEMSPEC ATTRIBUTES

  • author=
  • authors=
  • files
  • name
  • platform=
  • require_paths=
  • rubygems_version
  • summary
  • version

Apart from the list, there are some more attributes that can be included in the gemspec file. These attributes are optional. Some of them are license=, description etc.

117 questions
0
votes
1 answer

How can I get Prawn from :git in my Gemfile?

This is Rails 2.3.8, I am using Bundler 1.0.21 and RubyGems 1.6.2 on a Mac. When I do: bundle install I am met with: "PRAWN_VERSION = \"1.0.0.rc1\"\n\nGem::Specification.new do |spec|\n spec.name = \"prawn\"\n spec.version = PRAWN_VERSION\n …
RubyRedGrapefruit
  • 12,066
  • 16
  • 92
  • 193
0
votes
1 answer

Do Mongoid Gem have option for automatic reconnects?

I cannot find an option for automatic reconnection. If suppose Mongo server is down for a minute and we receive the following error: Mongo::Error::NoServerAvailable : No primary_preferred server is available in cluster: But now the Mongo server is…
HarshM
  • 21
  • 6
0
votes
1 answer

Could not find 'json' (>= 1.5.1) among 46 total gem(s) (Gem::MissingSpecError)

iam unable to install the pods in this project cd ios pod install this error shows Please help if you have any fix pods should install
0
votes
1 answer

There was an error parsing 'Gemfile': An empty gem name is not valid

I have a student receiving an error when running 'bundle install'. Things look right as far as file structure and the gemspec file. However I can't quite understand what this error is wanting to tell me. There are a lot of posts out there about this…
0
votes
1 answer

Best way to handle a direct dependency that another dependency uses in a gemspec file

In a Ruby project, I have a dependency that is used by my gem, and also used by a gem that my gem depends on. Specifically, I use sawyer and octokit, so my-gem depends on sawyer, and octokit also depends on sawyer. Right now, this is what I…
Spenser Black
  • 317
  • 3
  • 8
0
votes
2 answers

gem dependency version conflicts between a gem's spec, bundler, and gem install

I'm trying to install a gem, meta_search-1.1.0.pre2. The gem's spec, bundler, and rubygems each report/install different dependency version requirements. I have a new rails3 project (here are my rails, ruby, rubygems and installed gem versions),…
Mike Muldoon
  • 551
  • 1
  • 4
  • 11
0
votes
4 answers

How to fix Your Ruby version is 2.7.4, but your Gemfile specified 2.7.3

While I’m creating an react native new project in Mac OS . Im getting an error like “Your Ruby version is 2.7.4, but your Gemfile specified 2.7.3” How to solve this ?
Vasanth kumar
  • 41
  • 2
  • 9
0
votes
1 answer

Upgrade dry gems from very old versions to newer ones (for ruby 2.7 compatibility)

My company is currently trying to update our porject base to ruby 2.7 to prepare for a further update to ruby 3.x. All our projects are currently running with ruby 2.5. A lot of them were easy to update but i have to handle a very old gem that was…
Slth
  • 105
  • 7
0
votes
2 answers

Can comments be used in the .gemspec file?

I'm making a Ruby gem, and I want to put comments in the file. Would this be allowed, or would it mess up the gem? My code: # test Gem::Specification.new do |s| s.name = 'My Gem' # Add a better name s.version = '0.0.0' s.summary …
DaCuteRaccoon
  • 224
  • 2
  • 13
0
votes
2 answers

Installing RedCloth gem from github with bundler

I'm running into a problem with the latest versioned release of the RedCloth gem, 4.2.7. Specifically, it's the gcc 4.6 compile issue that was resolved in this commit, but has not yet been included in a release despite how long ago it was…
Matt Huggins
  • 81,398
  • 36
  • 149
  • 218
0
votes
1 answer

Update Ruby Gemspec Metadata After Publishing

Is it possible to change the source code link of the gem, after publishing.
Raja K
  • 21
  • 2
0
votes
2 answers

How to solve rails s error Gem::MissingSpecVersionError problem?

I am getting the error below when trying to run the application, so not sure how to solve it. $ rails s Traceback (most recent call last): 5: from bin/rails:2:in `
' 4: from bin/rails:2:in `load' 3: from…
J. Viégas
  • 135
  • 1
  • 11
0
votes
2 answers

gemspec dependencies definition and require conflict

I have a conflict between the gem dependencies definitions and the require of these gems. I have this: # Gemfile source "http://rubygems.org" gemspec - # my_gem.gemspec $:.push File.expand_path("../lib", __FILE__) require…
fguillen
  • 36,125
  • 23
  • 149
  • 210
0
votes
1 answer

Having trouble publishing my Ruby gem due to NoMethod errors and problems relating to my .gemspec file

I'm receiving this error when executing gem push pick_a_key-0.1.0.gem ERROR: While executing gem ... (NoMethodError) undefined method `downcase' for nil:NilClass I'm not entirely sure why I'm receiving it considering the app works fine when I…
0
votes
3 answers

Unable to run rake after updating rails versions

I have upgraded to rails 2.3.11 and and ruby 1.9.2 as some of my gems were incompatible with previous version. Now I am unable to execute rake command. I am getting following error when i do rake gems:install or rake db:migrate. (in…
Sara
  • 69
  • 2
  • 10