lucasefe / themes_for_rails

Theme Support for Rails 3
This very same page :)
MIT License
308 stars 102 forks source link

gem 0.5.0.pre broken on ruby 1.8.7 #47

Closed Vilea closed 12 years ago

Vilea commented 12 years ago

gem version 0.5.0.pre installed on a ruby 1.8.7 system breaks the whole rubygem repository. Although the installation is successful, any other gem command fails (e.g gem -v) fails with:

Invalid .gemspec format in '/Library/Ruby/Gems/1.8/specifications/themes_for_rails-0.5.0.pre.gemspec'

due to

<ArgumentError: Illformed requirement ["# 3.0.11"]>

Apparently the gem on rubygems.org contain this strange ["#YAML::Syck::DefaultKey:0x10aee33c8 3.0.11"] instead of a simple "="

..... s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, [">= 0"]) s.add_development_dependency(%q, ["#YAML::Syck::DefaultKey:0x10aee33c8 3.0.11"]) .....

Building the gem locally (gem build themes_for_rails.gemspec) and installing it locally (gem install themes_for_rails -l -v 0.5.0.pre) everything works just fine.

No, problem with ruby 1.9.3 systems, as well.

kule commented 12 years ago

I'd rather change my app over to 1.9 - however just to say this is the error I get on 1.8.7 which is probably a bit more useful:

 themes_for_rails-0.5.0.pre/lib/themes_for_rails/action_view.rb:48: syntax error, 
unexpected tIDENTIFIER, expecting tAMPER (SyntaxError)
  javascript_include_tag(*files, options)
                                        ^
themes_for_rails-0.5.0.pre/lib/themes_for_rails/action_view.rb:55: syntax error, 
unexpected tIDENTIFIER, expecting tAMPER
  stylesheet_link_tag(*files, options)
                                     ^
marcusvmsa commented 12 years ago

I got the same error...

That seems to be problem with the order of arguments of ruby 1.8 who was changed in ruby 1.9, now mandatory arguments after optional arguments are allowed

vishakhasawant commented 12 years ago

I am facing similar issue while running bundle install command. Although it runs successfully but gives below warning message. I am using gem 0.5.0 version of theme_for_rails.

WARNING: #<ArgumentError: Illformed requirement ["# 3.0.11"]>

-- encoding: utf-8 --

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

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Lucas Florio"] s.date = %q{2012-04-14} s.description = %q{It allows an application to have many different ways of rendering static assets and dynamic views.} s.email = ["lucasefe@gmail.com"] .................................. s.homepage = %q{https://github.com/lucasefe/themes_for_rails} s.require_paths = ["lib"] s.rubygems_version = %q{1.3.7} s.summary = %q{Theme Support for Rails 3} s.test_files = ["test/dummy_app/.gitignore", "test/dummy_app/Gemfile", "test/dummy_app/Rakefile", "test/dummy_app .................................. 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<rails>, [">= 3.0.0"])
  s.add_development_dependency(%q<sqlite3>, [">= 0"])
  s.add_development_dependency(%q<test-unit>, [">= 0"])
  s.add_development_dependency(%q<contest>, [">= 0"])
  s.add_development_dependency(%q<mocha>, [">= 0"])
  s.add_development_dependency(%q<rails>, ["#<Syck::DefaultKey:0x0000001033b408> 3.0.11"])
...................................

WARNING: Invalid .gemspec format in '/usr/lib/ruby/gems/1.9.1/specifications/themes_for_rails-0.5.0.gemspec'

lucasefe commented 12 years ago

You are all right, but I'm sorry, I don't have ruby 1.8.7 anymore and it will be deprecated in June. If you send a pull request, I will check it and merge it. Thanks and sorry for the inconvenience.