Ruby on Rails runtime issues

UNIXgod

Daemon

Thanks: 199
Messages: 1,088

#1
Just trying to get this started. running into some problems.

Here is the error:
# rails demo
/usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/bin/../lib/rails_generator/options.rb:32:in `default_options': undefined method `write_inheritable_attribute' for Rails::Generator::Base:Class (NoMethodError)
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/bin/../lib/rails_generator/base.rb:90
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/bin/../lib/rails_generator.rb:34
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/rails-2.2.2/bin/rails:13
from /usr/local/bin/rails:19:in `load'
other info if it helps:

# gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 1.2.0
- RUBY VERSION: 1.8.6 (2008-08-11 patchlevel 287) [amd64-freebsd7]
- INSTALLATION DIRECTORY: /usr/local/lib/ruby/gems/1.8
- RUBY EXECUTABLE: /usr/local/bin/ruby18
- EXECUTABLE DIRECTORY: /usr/local/bin
- RUBYGEMS PLATFORMS:
- ruby
- amd64-freebsd-7
- GEM PATHS:
- /usr/local/lib/ruby/gems/1.8
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- http://gems.rubyforge.org
# gem list --local

*** LOCAL GEMS ***

actionmailer (2.2.2)
actionpack (2.2.2)
activerecord (2.2.2)
activeresource (2.2.2)
activesupport (2.2.2)
rails (2.2.2)
rake (0.8.3)
rubygems-update (1.3.1)
sources (0.0.2)
what am I missing here?

I initailly installed rails via this howto:

http://wiki.rubyonrails.org/rails/pages/RailsOnFreeBSD

# cd /usr/ports/devel/ruby-gems && make install clean
# rehash
# gem install rails
# rehash
 

MartijnAtLico

New Member

Thanks: 3
Messages: 19

#2
write_inheritable_attribute is defined in ActiveSupport, what happens when you try to load ActiveSupport manually from irb?

$ irb
>> require 'rubygems'
>> require 'activesupport'
This should give you some more insight as to why ActiveSupport isn't working.
 
OP
OP
UNIXgod

UNIXgod

Daemon

Thanks: 199
Messages: 1,088

#3
ok. here is the error from that:
# irb
irb(main):001:0> require 'rubygems'
=> true
irb(main):002:0> require 'activesupport'
LoadError: no such file to load -- iconv
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/inflector.rb:3
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support.rb:26
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
from /usr/local/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/activesupport.rb:1
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
from (irb):2
irb(main):003:0>
I don't know what iconv even is. am I missing something?
 
OP
OP
UNIXgod

UNIXgod

Daemon

Thanks: 199
Messages: 1,088

#5
MartijnAtLico said:
Iconv is a library for converting text between different encodings. Try installing the ruby-iconv port (/usr/ports/converters/ruby-iconv), that should fix your problem!
It did!!! Thank you!
 
Top