Skip to content

Installation: WARNING: Invalid .gemspec format in ... #835

Closed
tr37ion opened this Issue May 19, 2012 · 20 comments
@tr37ion
tr37ion commented May 19, 2012

Hi,

so long the installation process is more or less strait forward, but now I get the following error:

WARNING: Invalid .gemspec format in '/home/gitlab/gitlab/vendor/bundle/ruby/1.8/specifications/carrierwave-0.6.2.gemspec'
Could not find carrierwave-0.6.2 in any of the sources
Run
bundle installto install missing gems.

I was about to run the following command:

sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production

Any suggestions?

@ariejan
ariejan commented May 19, 2012

Make sure you're using ruby 1.9. As you can see from the path, you're on 1.8.

@ariejan ariejan closed this May 19, 2012
@tr37ion
tr37ion commented May 20, 2012

I upgraded to ruby 1.9.1 (Debian Squeeze) but I'm stopped a t the same location with the same error message.

WARNING: Invalid .gemspec format in '/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/specifications/carrierwave-0.6.2.gemspec'
Could not find carrierwave-0.6.2 in any of the sources
Run bundle install to install missing gems.`

Sure I did what the error message said, but no success and Google doesn't give me a hint. :(

@ariejan
ariejan commented May 20, 2012

As you read the documentation you see you need ruby-1.9.2-p290

https://github.com/gitlabhq/gitlabhq_install/blob/master/ubuntu_ruby.sh

@tr37ion
tr37ion commented May 20, 2012

I installed ruby 1.9.3 now and I deleted the old 'vendor' folder before I set up a new one with:

sudo -u gitlab -H bundle install --without development test --deployment

which results in:

`Using yaml_db (0.2.2) from https://github.com/gitlabhq/yaml_db.git (at master) Your bundle is complete! It was installed into ./vendor/bundle Post-install message from rdoc: Depending on your version of ruby, you may need to install ruby rdoc/ri data:
<= 1.8.6 : unsupported
= 1.8.7 : gem install rdoc-data; rdoc-data --install
= 1.9.1 : gem install rdoc-data; rdoc-data --install

= 1.9.2 : nothing to do! Yay!
Post-install message from httparty:
When you HTTParty, you must party hard!`

When I do:

sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production

I get still the same error message:

WARNING: Invalid .gemspec format in '/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/specifications/carrierwave-0.6.2.gemspec'
Could not find carrierwave-0.6.2 in any of the sources
Run
bundle installto install missing gems

Why is the old bundle version installed again? Where can I set that the 'bundle install' get's the newest version 1.9.3? Are there any arguments for that?

ruby -v gives me the current version 1.9.3

@tainoryan

I am having the same issue. With a clean install of Ubuntu 11.10 server and using gitlabhq install scripts at

https://github.com/gitlabhq/gitlabhq_install

I still get "Could not find carrierwave-0.6.2 in any of the sources"

ruby -v gives ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]

@ariejan
ariejan commented May 21, 2012

Could you try deleting the offending gemspec file and run bundle install again?

/home/gitlab/gitlab/vendor/bundle/ruby/1.8/specifications/carrierwave-0.6.2.gemspec

@tainoryan

Yes removing the gemspec and doing a bundle install does work.

Note* if you follow the instructions given at

https://github.com/gitlabhq/gitlabhq_install/blob/master/README.md

you will need to remove the gemspec located in the usr dir...

sudo rm -rf /usr/local/lib/ruby/gems/1.9.1/specifications/carrierwave-0.6.2.gemspec

when installing on Ubuntu 11.10

Thanks

@chibani
chibani commented May 22, 2012

I have the same issue while migrating from 2.4.1 to 2.5
Each time I run bundle install --without development test, I always see this line Installing carrierwave (0.6.2)
But, then, when I run bundle exec rake db:migrate RAILS_ENV=production
It tells me that carrierwave is missing :

WARNING: Invalid .gemspec format in '/home/gitlabhq/gitlabhq/vendor/bundle/ruby/1.9.1/specifications/carrierwave- 0.6.2.gemspec'
Could not find carrierwave-0.6.2 in any of the sources
Run bundle install to install missing gems.


Also, gem list -d carrierwave gives me :

*** LOCAL GEMS ***

@wdamien
wdamien commented May 22, 2012

I'm also having the same issue on Ubuntu 10.04.4, updating from 2.4.1 to 2.5

  • I have tried deleting the *.gemspec and re-installing the gem.
  • Ruby v1.9.2
@wdamien
wdamien commented May 22, 2012

Some more details, I can install the bundle just fine, the error happens after running:

bundle exec rake db:migrate RAILS_ENV=production

Then I get this error: (seems like more of an carrierwave issue, to-bad is blocking the gitlab upgrade).

WARNING:  #<ArgumentError: Illformed requirement ["#<Syck::DefaultKey:0xaaadb24> 1.1.4"]>
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
  s.name = %q{carrierwave}
  s.version = "0.6.2"

  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
  s.authors = ["Jonas Nicklas"]
  s.date = %q{2012-04-12}
  s.description = %q{Upload files in your Ruby applications, map them to a range of ORMs, store them on different backends.}
  s.email = ["jonas.nicklas@gmail.com"]
  s.extra_rdoc_files = ["README.md"]
  s.files = ["lib/carrierwave/compatibility/paperclip.rb", "lib/carrierwave/locale/en.yml", "lib/carrierwave/mount.rb", "lib/carrierwave/orm/activerecord.rb", "lib/carrierwave/processing/mime_types.rb", "lib/carrierwave/processing/mini_magick.rb", "lib/carrierwave/processing/rmagick.rb", "lib/carrierwave/sanitized_file.rb", "lib/carrierwave/storage/abstract.rb", "lib/carrierwave/storage/file.rb", "lib/carrierwave/storage/fog.rb", "lib/carrierwave/test/matchers.rb", "lib/carrierwave/uploader/cache.rb", "lib/carrierwave/uploader/callbacks.rb", "lib/carrierwave/uploader/configuration.rb", "lib/carrierwave/uploader/default_url.rb", "lib/carrierwave/uploader/download.rb", "lib/carrierwave/uploader/extension_whitelist.rb", "lib/carrierwave/uploader/mountable.rb", "lib/carrierwave/uploader/processing.rb", "lib/carrierwave/uploader/proxy.rb", "lib/carrierwave/uploader/remove.rb", "lib/carrierwave/uploader/serialization.rb", "lib/carrierwave/uploader/store.rb", "lib/carrierwave/uploader/url.rb", "lib/carrierwave/uploader/versions.rb", "lib/carrierwave/uploader.rb", "lib/carrierwave/validations/active_model.rb", "lib/carrierwave/version.rb", "lib/carrierwave.rb", "lib/generators/templates/uploader.rb", "lib/generators/uploader_generator.rb", "README.md"]
  s.homepage = %q{https://github.com/jnicklas/carrierwave}
  s.rdoc_options = ["--main"]
  s.require_paths = ["lib"]
  s.rubyforge_project = %q{carrierwave}
  s.rubygems_version = %q{1.3.7}
  s.summary = %q{Ruby file upload library}

  if s.respond_to? :specification_version then
    current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
    s.specification_version = 3

    if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
      s.add_runtime_dependency(%q<activesupport>, [">= 3.2.0"])
      s.add_runtime_dependency(%q<activemodel>, [">= 3.2.0"])
      s.add_development_dependency(%q<mysql2>, [">= 0"])
      s.add_development_dependency(%q<rails>, [">= 3.2.0"])
      s.add_development_dependency(%q<cucumber>, ["#<Syck::DefaultKey:0xaaadb24> 1.1.4"])
      s.add_development_dependency(%q<json>, [">= 0"])
      s.add_development_dependency(%q<rspec>, ["~> 2.0"])
      s.add_development_dependency(%q<sham_rack>, [">= 0"])
      s.add_development_dependency(%q<timecop>, [">= 0"])
      s.add_development_dependency(%q<fog>, [">= 1.3.1"])
      s.add_development_dependency(%q<mini_magick>, [">= 0"])
      s.add_development_dependency(%q<rmagick>, [">= 0"])
    else
      s.add_dependency(%q<activesupport>, [">= 3.2.0"])
      s.add_dependency(%q<activemodel>, [">= 3.2.0"])
      s.add_dependency(%q<mysql2>, [">= 0"])
      s.add_dependency(%q<rails>, [">= 3.2.0"])
      s.add_dependency(%q<cucumber>, ["#<Syck::DefaultKey:0xaaadb24> 1.1.4"])
      s.add_dependency(%q<json>, [">= 0"])
      s.add_dependency(%q<rspec>, ["~> 2.0"])
      s.add_dependency(%q<sham_rack>, [">= 0"])
      s.add_dependency(%q<timecop>, [">= 0"])
      s.add_dependency(%q<fog>, [">= 1.3.1"])
      s.add_dependency(%q<mini_magick>, [">= 0"])
      s.add_dependency(%q<rmagick>, [">= 0"])
    end
  else
    s.add_dependency(%q<activesupport>, [">= 3.2.0"])
    s.add_dependency(%q<activemodel>, [">= 3.2.0"])
    s.add_dependency(%q<mysql2>, [">= 0"])
    s.add_dependency(%q<rails>, [">= 3.2.0"])
    s.add_dependency(%q<cucumber>, ["#<Syck::DefaultKey:0xaaadb24> 1.1.4"])
    s.add_dependency(%q<json>, [">= 0"])
    s.add_dependency(%q<rspec>, ["~> 2.0"])
    s.add_dependency(%q<sham_rack>, [">= 0"])
    s.add_dependency(%q<timecop>, [">= 0"])
    s.add_dependency(%q<fog>, [">= 1.3.1"])
    s.add_dependency(%q<mini_magick>, [">= 0"])
    s.add_dependency(%q<rmagick>, [">= 0"])
  end
end
WARNING:  Invalid .gemspec format in '/usr/local/lib/ruby/gems/1.9.1/specifications/carrierwave-0.6.2.gemspec'
Could not find carrierwave-0.6.2 in any of the sources
@tr37ion
tr37ion commented May 22, 2012

I could install it now. There are some issues to think of. The Debian ruby installation as described here doesn't consider that there are still other folders where Debian installes it's own folders. I'm not sure exactly what it was that it's now working, but I will describe what I did...

1)

  • I deleted all ruby related packages via aptitude
  • Then I deleted their folders manually
  • I deleted also the /vendor/bundle/ folder
  • Then I downloaded 'rvm' form https://rvm.io/ and installed it with ruby 1.9.3 (Be carefull and read the instructions.)
  • At this stage you can relogin again and try it again.

  1. Another idea would be just to install the Debian Backports http://backports-master.debian.org/ and just install the official Debian ruby 1.9.2 packages. This may be easier, than the steps above. I didn't try it, because I hadn't the idea to do so ,)

I would recommend the second way via backports. Please report here:)

@Skarm
Skarm commented May 23, 2012

Can help:
sudo gem update --system
and continue
bundle exec rake db:migrate RAILS_ENV=production

The wiki is already corrected

@chibani
chibani commented May 23, 2012

Thanks (a lot, really a lot !) @Skarm ;)

@dbaty
dbaty commented May 23, 2012

I had the same error as reported above:

Invalid .gemspec format in '/home/gitlab/gitlab/vendor/bundle/ruby/1.9.1/specifications/carrierwave-0.6.2.gemspec'`

The error message does include the offending lines, which look like:

s.add_dependency(%q<cucumber>, ["#<Syck::DefaultKey:0x8ff1b50> 1.1.4"])

I changed those lines in the given file to:

s.add_dependency(%q<cucumber>, ["> 1.1.4"])

... and re-ran the /bundle exec rake gitlab:app:setup RAILS_ENV=production command, which this time succeeded.

@wdamien
wdamien commented May 23, 2012

@Skarm Thanks! sudo gem update --system , then re-running db:migrate worked for me.

@bpavie
bpavie commented May 25, 2012

Thanks a lot dbaty,
I got a similar problem to upgrade from 2.4 to 2.5 on ubuntu 11 and remove the "#<Syck::DefaultKey:0x8ff1b50" solved the problem!

@videoMonkey

Eventually working through everything here I was able to make it work. Thanks everyone.

@tr37ion
tr37ion commented Jun 4, 2012

I now installed the Debian Backports for my Debian edition. This worked well and it also soled some issues with nginx as a proxy for my Apache server. Now everything works well. Nginx as gitlab server and Apache-Proxy; Apache for all my other webpages and Plesk 10.4 still working.

I would recommend not to recommend installing ruby and nginx manually like in the wiki. Instead use Debian Backports and install it the 'official' way.


PS: If someone need info how to install nginx, Apache, gitlab within an Plesk environment you can use the scripts at read https://github.com/clops/Nginx-Scripts-for-Plesk/ and read issue 1 there.

@TroodoNmike

sudo gem update --system
and
dbaty: thanks that helped!

@Jbonnett
Jbonnett commented Sep 4, 2012

I had to download carrierwave and build and install the gem myself on ubuntu 12.04 server following https://github.com/gitlabhq/gitlabhq_install/blob/master/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.