Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7754655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T12:21:53+00:00 2026-06-01T12:21:53+00:00

Note: I asked this question when I got unexpected messages when doing bundle install

  • 0

Note:
I asked this question when I got unexpected messages when doing bundle install with the factory_girl gem using Ubuntu 11.10. Being a noob I had … and still have … no idea what was going on. The update below attempts to outline what I did to eventually get rid of the messages. I am leaving the question around with a slightly more pertinent title line in case it might be of use to someone else.

I look at Factory Girl’s README.md and I see:

    Install
      gem install factory_girl
    or add the following line to Gemfile:
      gem 'factory_girl'
    and run bundle install from your shell.

    Supported Ruby versions
    The Factory Girl 3.x series supports Ruby 1.9.x.
    For older versions of Ruby, please use the Factory Girl 2.x series.

Since I am currently using
Rails 3.1.0 and
ruby 1.9.2p290 (2011-07-09 revision 32553) [i686-linux]

I add gem 'factory_girl' to my Gemfile and do bundle update.

But then continuing on I open the Getting Started.md file and read

    Update Your Gemfile
    If you're using Rails, you'll need to change
    the required version of factory_girl_rails:
      gem "factory_girl_rails", "~> 2.0"
    If you're not using Rails, you'll just have to
    change the required version of factory_girl:
      gem "factory_girl", "~> 3.0"
    Once your Gemfile is updated, you'll want to update your bundle.

OK, fine. I remove gem 'factory_girl' from my Gemfile and instead add
gem "factory_girl_rails", "~> 2.0".
I then try bundle update once again. This time, no joy.

    $bundle install
    Invalid gemspec in [/usr/local/lib/ruby/gems/1.9.1/specifications/
      factory_girl_rails-2.0.0.gemspec]: Illformed requirement
      ["# 3.0.7"]
    Invalid gemspec in [/usr/local/lib/ruby/gems/1.9.1/specifications/
      factory_girl_rails-2.0.0.gemspec]: Illformed requirement 
      ["# 3.0.7"]
    Fetching source index for http://rubygems.org/
    Using rake (0.9.2.2) 
    Using ZenTest (4.7.0) 
    ... a bunch of "Using" lines omitted for brevity ...
    Using deepopenstruct (0.1.2) 
    Using factory_girl (3.0.0) 
    Installing factory_girl_rails (2.0.0) Invalid gemspec in
      [/usr/local/lib/ruby/gems/1.9.1/specifications/factory_girl_rails-2.0.0.gemspec]:
      Illformed requirement ["# 3.0.7"]  
    Using haml (3.1.4) 
    Using jquery-rails (1.0.19) 
    ... a bunch of "Using" lines omitted for brevity ...
    Using uglifier (1.2.4) 
    Your bundle is complete! Use `bundle show [gemname]` to see where a
      bundled gem is installed.

So now I’m wondering (1) why following the instructions in the READMEs have apparently not worked and (2) what should I do to my Gemfile in order to get Factory Girl smiling and productive?


Update

While getting error messages which I do not understand is frustrating, getting rid of them but not really being sure what I did to, err, “fix” things is also less special. Oh, well.

In all honesty, though I have been using bundle I had no idea what the difference was between gem, rvm, and bundle nor did I really understand what each command is supposed to do. I think this blog entry I found via Google helped somewhat with that:
RVM and Bundler in Five Seconds

Thinking that rvm and bundle are supposed to automate the management of a group of gems while gem just manages gems, I looked at the gem commands.

I tried gem check which IIRC did nothing. I then tried gem cleanup which came back with a long list of gems it wanted to uninstall. Trusting that I could (probably) get back to where I needed to be by using bundle install, I let it do the uninstalls. (Though I had to use sudo gem cleanup because I lacked write permission to some of the directories involved).

After doing this gem check and gem cleanup came back clean. However, bundle check returned:

The following gems are missing
 * activesupport (3.1.0)
 * activemodel (3.1.0)
 * rack-cache (1.0.3)
 * actionpack (3.1.0)
Install missing gems with `bundle install`

So I did both bundle install followed by (why not?) bundle update. This installed the gems listed above with no problems. In particular, this time I did not get the Invalid gemspec or any other error messages. (Hurrah!)

Of course, bundle update did nothing as, frankly, I was expecting it to do.

So while I’m still not sure what happened, the original reason for my question has been kinda, sorta solved.

I’ll leave this question unanswered for a week or so to see if anyone else wants to contribute any comments. After that if no one else provides a more informative answer, I guess I’ll just “answer” this question myself to close it out.

Thanks to all who helped nudge me towards a cleaner set of gems.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T12:21:55+00:00Added an answer on June 1, 2026 at 12:21 pm

    There is no point that I can see in keeping this question open any longer. While I never did clearly understand why I was getting Invalid gemspec, the steps which are listed in my update to my question “solved” that “problem”.

    It would be nice if there was a way to simply close a question as “An answer is no longer a priority for me” or even simply “I’ve moved on“. But there isn’t. This “answer” will at least take this question off the list of things to still be looked at.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Note: I've asked this question in a similiar format on superuser but it seems
Note: Originally this question was asked for PostgreSQL, however, the answer applies to almost
I recently asked this question here and got some great answers! Custom SQL GROUP
So, I previously asked this question: Can someone help me compare using F# over
Note: A have asked this question at the Superuser community first , but since
Note : This question has been re-asked with a summary of all debugging attempts
Editor's note: This question was asked before Rust 1.0 was released and the syntax,
NOTE:: I have also asked this question on the Clearcanvas forums at:: http://www.clearcanvas.ca/dnn/tabid/69/afv/topic/aff/11/aft/15086/Default.aspx Hi,
Note: This is an extension of an earlier question I asked here: Do additional
Note: This is an extension of an earlier question I asked here: Do additional

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.