
Rails rake gems:build requires make clean
Reported by Patrick Berkeley | December 14th, 2008 @ 05:47 AM | in 4.2.0
config.gem "RedCloth", :version => ">=3.301", :source => "http://code.whytheluckystiff.net"
in environment.rb results in the following:
rake db:migrate
no such file to load -- RedCloth
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:95:in `load'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:281:in `load_gems'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:281:in `each'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:281:in `load_gems'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:164:in `process'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:112:in `send'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:112:in `run'
/home/pb/public_html/sb/releases/20081214100119/config/environment.rb:13
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Missing these required gems:
RedCloth = 4.1.1
You're running:
ruby 1.8.6.111 at /usr/bin/ruby1.8
rubygems 1.2.0 at /usr/lib/ruby/gems/1.8
Run `rake gems:install` to install the missing gems.
rake gems:install
results in:
no such file to load -- RedCloth
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:155:in `require'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:95:in `load'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:281:in `load_gems'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:281:in `each'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:281:in `load_gems'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:164:in `process'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:112:in `send'
/home/pb/public_html/sb/releases/20081214100119/config/../vendor/rails/railties/lib/initializer.rb:112:in `run'
/home/pb/public_html/sb/releases/20081214100119/config/environment.rb:13
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
/usr/local/lib/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/railties/lib/tasks/misc.rake:3
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/home/pb/public_html/sb/releases/20081214100119/vendor/rails/railties/lib/tasks/gems.rake:21
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:588:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:585:in `invoke_prerequisites'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:577:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
gem install RedCloth --version "= 4.1.1" --source http://code.whytheluckystiff.net
ERROR: could not find gem RedCloth locally or in a repository
After reinstalling RedCloth as suggested and raking the database, I get the same error again.
I get the same results on both OS X and Ubuntu with:
- Rails 2.2.0
- ruby 1.8.6
- rubygems 1.3.1
- RedCloth 4.1.1
Comments and changes to this ticket
-
Patrick Berkeley December 14th, 2008 @ 05:56 AM
others have received various similar errors: http://railsforum.com/viewtopic....
-
Nate Bird January 17th, 2009 @ 12:19 AM
I've had the same problem in essentially the same environment.
I just wanted to add that after unpacking the gem and then trying to build it natively in Ubuntu with this command:
sudo rake gems:build --trace
I get the following:
(in /home/e/public_html/h/releases/20090117045648) ** Invoke gems:build (first_time) ** Execute gems:build Built gem: '/home/e/public_html/h/releases/20090117045648/vendor/gems/rubyist-aasm-2.0.2' Built gem: '/home/e/public_html/h/releases/20090117045648/vendor/gems/capistrano-ext-1.2.1' Built gem: '/home/e/public_html/h/releases/20090117045648/vendor/gems/rspec-1.1.11' rake aborted! ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb gems:build --trace creating Makefile make cc -shared -o redcloth_scan.so redcloth_scan.o redcloth_attributes.o redcloth_inline.o -L. -L/usr/lib -L. -Wl,-Bsymbolic-functions -rdynamic -Wl,-export-dynamic -lruby1.8 -lpthread -ldl -lcrypt -lm -lc redcloth_scan.o: file not recognized: File format not recognized collect2: ld returned 1 exit status make: *** [redcloth_scan.so] Error 1 Gem files will remain installed in /home/e/public_html/h/releases/20090117045648/vendor/gems/RedCloth-4.1.1 for inspection. Results logged to /home/e/public_html/h/releases/20090117045648/vendor/gems/RedCloth-4.1.1/ext/redcloth_scan/gem_make.out /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:502:in `build_extensions' /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:465:in `each' /usr/local/lib/site_ruby/1.8/rubygems/installer.rb:465:in `build_extensions' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/gems.rake:33 /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/gems.rake:28:in `each' /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/tasks/gems.rake:28 /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `call' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:617:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:612:in `execute' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:578:in `invoke_with_call_chain' /usr/lib/ruby/1.8/monitor.rb:242:in `synchronize' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:571:in `invoke_with_call_chain' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:564:in `invoke' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2019:in `invoke_task' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `each' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1997:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1991:in `top_level' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1970:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:2036:in `standard_exception_handling' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake.rb:1967:in `run' /usr/lib/ruby/gems/1.8/gems/rake-0.8.3/bin/rake:31 /usr/bin/rake:19:in `load' /usr/bin/rake:19
-
Nate Bird January 17th, 2009 @ 12:49 AM
Ok, so the problem comes down to the 'make' command. I ran 'make clean' within the redcloth_scan directory and then ran 'make' and it built the gem just fine.
I don't know why - but that did the trick.
-
Patrick Berkeley January 17th, 2009 @ 02:47 AM
Running 'make clean' from redcloth_scan worked for me too.
Thanks, Nate.
-
Jason Garber January 20th, 2009 @ 04:58 PM
- Tag set to build, gem, rake
- State changed from new to resolved
Glad it's resolved for you.
-
Jason Garber March 17th, 2009 @ 04:27 AM
- Milestone cleared.
- State changed from resolved to open
- Title changed from Gem dependency failure to Gems build requires make clean
I ran across this again and want to figure out if there's a way to not have to run make clean.
-
Jason Garber March 17th, 2009 @ 04:36 AM
- Milestone set to 4.2.0
- Title changed from Gems build requires make clean to Rails rake gems:build requires make clean
-
Jason Garber May 26th, 2009 @ 04:40 PM
I've been experimenting with this all afternoon and I think it's fine. I'll leave the ticket open, though, and try it once I push out the 4.2.0 gem. Right now I'm getting an error because I'm requesting a version that doesn't exist on RubyForge yet.
-
Jason Garber June 10th, 2009 @ 03:00 PM
- State changed from open to resolved
Confirmed working with Rails 2.3 and RedCloth 4.2.
~/Documents/rails-2-3-for-redcloth $ gem list RedCloth *** LOCAL GEMS *** RedCloth (3.0.4) ~/Documents/rails-2-3-for-redcloth $ rake gems (in /Users/jdg948/Documents/rails-2-3-for-redcloth) - [ ] RedCloth >= 4.2 I = Installed F = Frozen R = Framework (loaded before rails starts) ~/Documents/rails-2-3-for-redcloth $ rake db:migrate (in /Users/jdg948/Documents/rails-2-3-for-redcloth) Missing these required gems: RedCloth >= 4.2 You're running: ruby 1.8.6.114 at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby rubygems 1.3.1 at /Users/jdg948/.gem/ruby/1.8, /Library/Ruby/Gems/1.8, /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8 Run `rake gems:install` to install the missing gems. ~/Documents/rails-2-3-for-redcloth $ sudo rake gems:install (in /Users/jdg948/Documents/rails-2-3-for-redcloth) gem install RedCloth --version ">= 4.2" Building native extensions. This could take a while... Successfully installed RedCloth-4.2.0 1 gem installed Installing ri documentation for RedCloth-4.2.0... Installing RDoc documentation for RedCloth-4.2.0... ~/Documents/rails-2-3-for-redcloth $ sudo rake gems:build (in /Users/jdg948/Documents/rails-2-3-for-redcloth) Unpacked gem: '/Users/jdg948/Documents/rails-2-3-for-redcloth/vendor/gems/RedCloth-4.2.0' Built gem: '/Users/jdg948/Documents/rails-2-3-for-redcloth/vendor/gems/RedCloth-4.2.0' ~/Documents/rails-2-3-for-redcloth $ ./script/console Loading development environment (Rails 2.3.2) >> RedCloth.new("works now").to_html => "<p>works now</p>" >> RedCloth::VERSION => 4.2.0 >> exit
-
Roger November 27th, 2009 @ 01:09 PM
for followers, getting a similar error [on an unrelated gem]
meant [for me] "the gem for some reason actually includes the .o file in it when it gets to you-- an error on the gem creator's part, perhaps"
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
RedCloth is a Ruby library for converting Textile into HTML