Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `link_local?' for #<IPAddress::IPv4:0x007fbd8353e880> #107

Closed
RedaBenh opened this issue Jan 6, 2019 · 2 comments
Closed

Comments

@RedaBenh
Copy link

RedaBenh commented Jan 6, 2019

To reproduce

> ip_adr = IPAddress('192.168.0.1')
> ip_adr.link_local?

or

> ip_adr = IPAddress::IPv4.new('192.168.0.1')
> ip_adr.link_local?

I get this error:

NoMethodError: undefined method `link_local?' for #<IPAddress::IPv4:0x007f9c7c790a70>
  from (irb):19
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/railties-4.2.8/lib/rails/commands/console.rb:110:in `start'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/railties-4.2.8/lib/rails/commands/console.rb:9:in `start'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:68:in `console'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/railties-4.2.8/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/railties-4.2.8/lib/rails/commands.rb:17:in `<top (required)>'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `block in require'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:274:in `require'
  from /Users/redapc/Sites/INSPINIA-WB0R5L90S/easyforce/bin/rails:9:in `<top (required)>'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `block in load'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:240:in `load_dependency'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/activesupport-4.2.8/lib/active_support/dependencies.rb:268:in `load'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/commands/rails.rb:6:in `call'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/command_wrapper.rb:38:in `call'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:201:in `block in serve'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:171:in `fork'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:171:in `serve'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:141:in `block in run'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `loop'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application.rb:135:in `run'
  from /Users/redapc/.rvm/gems/ruby-2.3.1/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in `<top (required)>'
  from /Users/redapc/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /Users/redapc/.rvm/rubies/ruby-2.3.1/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from -e:1:in `<main>'
@smortex
Copy link
Contributor

smortex commented Jan 6, 2019

Support was added in f35aab8. No release of the gem happened since that time, so you'll have to tweak your Gemfile to fetch the gem from GitHub at that commit or a more recent one, e.g.

gem 'ipaddress', git: 'https://github.com/ipaddress-gem/ipaddress.git', commit: 'f35aab8e9109864945f606bef3e135be3763b9c4'

@smortex smortex closed this as completed Jan 6, 2019
@RedaBenh
Copy link
Author

RedaBenh commented Jan 6, 2019

Merci 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants