Bug 496480
Summary: | Rails is broken | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Dietmar Kling <baldur> | ||||
Component: | rubygem-rails | Assignee: | David Lutterkort <lutter> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 11 | CC: | baldur, blackcode, cse.cem+redhatbugz, gdubreui, hbrock, lutter, mastahnke, mitchb, ricardo.arguello, sseago, vanmeeuwen+fedora | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | 2.3.2-3.fc11 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-08-01 23:56:55 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
Dietmar Kling
2009-04-19 15:05:41 UTC
Tested this on an x86 and x86_64 installation. Both machines show the same behaviour. BTW. ./scripts/generate is sufficient to show the bug (normally now a help message should come up). rails is broken and nobody is interested? I am interested, I simply haven't had time to look into it. Any suggestions for a fix ? Nope, i am quite new to rail and tried some research on the internet. There are various bug reports on such an issue on other versions, but they all fail to provide any solution. debug output - there at least seems something missing? # ruby --debug ./script/generate Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems.rb:871 - no such file to load -- rubygems/defaults/operating_system Exception `LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems/config_file.rb:35 - no such file to load -- Win32API Exception `Gem::LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems.rb:636 - Could not find RubyGem builder (~> 2.1.2) Exception `Gem::LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems.rb:636 - Could not find RubyGem memcache-client (>=1.6.5) Exception `Gem::LoadError' at /usr/lib/ruby/site_ruby/1.8/rubygems.rb:636 - Could not find RubyGem tzinfo (~> 0.3.12) Exception `TypeError' at (eval):4 - can't modify frozen object Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31 - no such file to load -- fast_xs Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:38 - no such file to load -- fast_xs Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31 - no such file to load -- Win32API Exception `MissingSourceFile' at /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:38 - no such file to load -- Win32API Exception `MissingSourceFile' at /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:162 - no such file to load -- Win32API Exception `NameError' at /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:20 - uninitialized class variable @@configuration in Rails /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/initializer.rb:20:in `configuration': uninitialized class variable @@configuration in Rails (NameError) from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:109:in `use_component_sources!' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator/lookup.rb:55:in `included' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator.rb:38:in `include' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator.rb:38:in `send' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails_generator.rb:38 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/commands/generate.rb:2 from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' from ./script/generate:3 at least one error i could remove by installing yum install rubygem-gem_plugin yum install rubygem-builder ( i originally did an install by yum install rubygem-rails and installed a all suggested packages by yum). This what is installed now, but still it doesn't work. #rpm -qa|grep ruby rubygem-rails-2.3.2-1.fc11.noarch ruby-mode-1.8.6.287-8.fc11.x86_64 rubygem-activeresource-2.3.2-1.fc11.noarch rubygem-activesupport-2.3.2-1.fc11.noarch ruby-irb-1.8.6.287-8.fc11.x86_64 rubygem-rake-0.8.4-1.fc11.noarch ruby-libs-1.8.6.287-8.fc11.x86_64 rubygem-actionmailer-2.3.2-1.fc11.noarch rubygem-gem_plugin-0.2.3-2.fc11.noarch rubygems-1.3.1-2.fc11.noarch ruby-devel-1.8.6.287-8.fc11.x86_64 rubygem-activerecord-2.3.2-1.fc11.noarch rubygem-actionpack-2.3.2-1.fc11.noarch ruby-1.8.6.287-8.fc11.x86_64 ruby-rdoc-1.8.6.287-8.fc11.x86_64 rubygem-builder-2.1.2-3.fc11.noarch Well in my desperate answer i tried the following... # gem install rails WARNING: Installing to ~/.gem since /usr/lib/ruby/gems/1.8 and /usr/bin aren't both writable. Successfully installed rails-2.3.2 1 gem installed WORKS! However i believe this not the way it should be :-) rubygem-rails-2.3.2-2.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/rubygem-rails-2.3.2-2.fc11 I found the issue - the spec file inadvertantly broke scripts/generate by patching the line 'require "#{RAILS_ROOT}/config/environment"' in lib/commands/generate.rb Built rubygem-rails-2.3.2-2 to address the issue I find that rubygem-rails-2.3.2-2 is still broken; running 'rails foo' to generate a new rails project shows that a few files are missing: create public/favicon.ico No such file or directory - /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator/generators/applications/app/../../../../../html/favicon.ico ... create log/server.log No such file or directory - /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator/generators/applications/app/../../../../../configs/empty.log (This list is not necessarily complete.) I have installed the version from 'gem install rails' for now; obviously this is not how-it-should-be. This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle. Changing version to '11'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Two files are missing from Fedora 11 rubygem-rails-2.3.2-2.fc11 rpm package. So when doing a "rails <application>" it would break right after: rails myapp .../... create public/favicon.ico No such file or directory - /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/bin/../lib/rails_generator/generators/applications/app/../../../../../html/favicon.ico It breaks the first time because gems/rails-2.3.2/Rakefile is looking for favicon.ico and later the empty.log is required by gems/rails-2.3.2/rails_generator/generators/applications/app/app_generator.rb The two missing files that are missing are: /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/html/favicon.ico /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/configs/empty.log Therefore the following files are not installed in the application tree: create public/robots.txt create public/images/rails.png create public/javascripts/prototype.js create public/javascripts/effects.js create public/javascripts/dragdrop.js create public/javascripts/controls.js create public/javascripts/application.js create doc/README_FOR_APP create log/server.log create log/production.log create log/development.log create log/test.log I guess those two files where ignored from the rpm spec files because there are empty. There are obviously needed - see Rakefile and CHANGELOG in gems/rails-2.3.2. BTW, that also breaks rails ajax/javascripts features as the public/javascripts/file are not copied during application structure generation. Temporary workarounds: 1 - Using gem package instead of standard rpm: # yum uninstall rubygem-rails # gem install rails 2 - Adding the two missing empty files (adapt your path /usr/lib/ruby/gems/1.8/gems accordingly) touch /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/html/favicon.ico touch /usr/lib/ruby/gems/1.8/gems/rails-2.3.2/configs/empty.log rubygem-rails specs file to add those two files. I hope it helps Created attachment 354243 [details]
Patch to spec file to avoid removing required zero-length files
Sometime between the version of this package appearing in Fedora 9
and the current version, the spec file gained a stanza that removes
all zero-length files from the destination tree. This is an error,
and causes it to remove the following four required empty files from
the package (and nothing else):
./configs/empty.log
./html/favicon.ico
./lib/rails_generator/generators/components/mailer/templates/fixture.rhtml
./lib/rails_generator/generators/components/mailer/templates/view.rhtml
Without the first two files above, you cannot even run 'rails' to
create a new application. This patch corrects the spec file to no
longer delete these required files.
Verified touching these 4 files and regenerating my rails app works for me. We'll make sure to apply the patch above for f11 and f12. Sorry about that. rubygem-rails-2.3.2-3.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/rubygem-rails-2.3.2-3.fc11 rubygem-rails-2.3.2-3.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update rubygem-rails'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-8020 rubygem-rails-2.3.2-3.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. --> Missing Dependency: rubygem(activesupport) = 2.3.2 is needed by package rubygem-activerecord-2.3.2-1.fc11.noarch (installed) |