rob-murray / ferver

A Ruby gem to serve files over HTTP, packaged as a Ruby gem
MIT License
14 stars 3 forks source link

Crashes on start: undefined method `require_relative' for main:Object (NoMethodError) #11

Closed vkotovv closed 9 years ago

vkotovv commented 9 years ago

I've tried to use ferver, but got this:

/var/lib/gems/1.8/gems/ferver-1.2.0/lib/ferver.rb:1: undefined method `require_relative' for main:Object (NoMethodError)
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
    from /usr/lib/ruby/vendor_ruby/1.8/rubygems/custom_require.rb:36:in `require'
    from /var/lib/gems/1.8/gems/ferver-1.2.0/bin/ferver:5
    from /usr/local/bin/ferver:19:in `load'
    from /usr/local/bin/ferver:19

My ruby:

ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

My gem list:

*** LOCAL GEMS ***

actionmailer (3.2.19)
actionpack (3.2.19)
activemodel (3.2.19)
activerecord (3.2.19)
activeresource (3.2.19)
activesupport (3.2.19)
arel (3.0.3)
awesome_nested_set (2.1.6)
builder (3.0.0)
bundler (1.6.3)
coderay (1.1.0)
erubis (2.7.0)
fastercsv (1.5.5)
ferver (1.2.0)
hike (1.2.3)
i18n (0.6.11)
journey (1.0.4)
jquery-rails (2.0.3)
json (1.8.1)
json-schema (2.2.2)
kramdown (1.3.3)
mail (2.5.4)
mime-types (1.25.1)
multi_json (1.10.1)
net-ldap (0.3.1)
pg (0.17.1)
polyglot (0.3.5)
rack (1.4.5)
rack-cache (1.2)
rack-openid (1.4.2)
rack-protection (1.5.3)
rack-ssl (1.3.4)
rack-test (0.6.2)
rails (3.2.19)
railties (3.2.19)
rake (10.1.1)
rdoc (3.12.2)
redcarpet (2.3.0)
ruby-openid (2.3.0)
sinatra (1.4.5)
sprockets (2.2.2)
thor (0.19.1)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (0.3.40)
vcard (0.2.12)
rob-murray commented 9 years ago

Hi @vkotovv Is there a reason you are using Ruby 1.8.7? I don't believe require_relative exists or behaves the same in that version of Ruby?

If you can upgrade and use a later version then that would fix it, this gem is supported on Ruby 1.9.3 and upwards - sorry I don't think that is mentioned on the README.

So, sorry Ruby 1.8.7 is not supported - it is very old and outdated now, I would upgrade unless a major problem with doing so.

Rob

vkotovv commented 9 years ago

I think Ruby 1.8.7 is a default for Ubuntu 12.04 LTS, which I'm using. Thanks for clarification, did not know 1.9.3 is needed. It will be great if you merge that commit and mention Ruby version in Readme.

rob-murray commented 9 years ago

Will do, thanks for pointing this out.