yatish27 / linkedin-scraper

Scrapes the public profile of the linkedin page
MIT License
553 stars 221 forks source link

Lib paths? #20

Closed kaisarea closed 10 years ago

kaisarea commented 10 years ago

Hello there, let me first thank you very much for a great piece of software!

I was having little trouble installing this both on Mac OS X and Ubuntu, error being pretty much the same.

kaisar@kaisar-MS-7641:~$ linkedin-scraper http://www.linkedin.com/in/jeffweiner08

/home/kaisar/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- ./lib/linkedin-scraper (LoadError) from /home/kaisar/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:inrequire' from /home/kaisar/.rvm/gems/ruby-2.0.0-p247/gems/linkedin-scraper-0.0.11/bin/linkedin-scraper:3:in <top (required)>' from /home/kaisar/.rvm/gems/ruby-2.0.0-p247/bin/linkedin-scraper:23:inload' from /home/kaisar/.rvm/gems/ruby-2.0.0-p247/bin/linkedin-scraper:23:in <main>' from /home/kaisar/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:ineval' from /home/kaisar/.rvm/gems/ruby-2.0.0-p247/bin/ruby_executable_hooks:15:in `

'

Could you give me a pointer as to how I may solve this?

Thank you very much

kaisarea commented 10 years ago

I installed this package in the home directory without sudoing. I have solved the problem by editing the file /home/kaisar/.rvm/gems/ruby-2.0.0-p247/gems/linkedin-scraper-0.0.11/bin/linkedin-scraper and replacing ./lib/linkedin-scraper with /home/kaisar/.rvm/gems/ruby-2.0.0-p247/gems/linkedin-scraper-0.0.11/lib/linkedin-scraper.rb.

yatish27 commented 10 years ago

I have pushed a fix on master. Even if you remove the #! path it works. Please test and report

yatish27 commented 10 years ago

Will be pushing to rubygems after few tests

kaisarea commented 10 years ago

I believe that the line require './lib/linkedin-scraper' should be changed to require './lib/linkedin-scraper.rb' for this to work. At least on my computer.

kaisarea commented 10 years ago

Thanks for the quick feedback!

kaisarea commented 10 years ago

Works like a charm now!

yatish27 commented 10 years ago

Good to go on rubygems?

tuxmartin commented 10 years ago

I had the same problem: https://github.com/yatish27/linkedin-scraper/issues/18

kaisarea commented 10 years ago

Something is not right with that relative path './lib/linkedin-scraper'. Like Martin (@tuxmartin) I will go with an absolute path which in my case contains my home directory. I don't use Ruby so I don't know how to code an equivalent of $HOME one could use in bash.

yatish27 commented 10 years ago

Looks like it is fixed on the latest version i just published 0.0.13 I tested it on ubuntu and mac