Closed bricemaurin closed 8 years ago
Hello Yatish, Same error for ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-darwin14] with Rails 4.2.4. Does gem support this version? Thanks!
@yatish27 any idea ?
Can you check the latest version ?
I checked with the latest version (1.0.1)
# bundle show 'linkedin-scraper'
/Users/me/.rvm/gems/ruby-2.2.0/gems/linkedin-scraper-1.0.1
When running the console, I still get that error:
Loading development environment (Rails 4.2.0)
2.2.0 :001 > profile = Linkedin::Profile.get_profile("http://www.linkedin.com/in/jeffweiner08")
NameError: uninitialized constant Linkedin
from (irb):1
from /Users/me/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:110:in `start'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/console.rb:9:in `start'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:68:in `console'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
from /Users/me/.rvm/gems/ruby-2.2.0/gems/railties-4.2.0/lib/rails/commands.rb:17:in `<top (required)>'
from /Users/me/code/deuxio/lnkdn-xtrct/bin/rails:8:in `<top (required)>'
from /Users/me/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /Users/me/.rvm/rubies/ruby-2.2.0/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>'
As you can see, I'm using ruby 2.2.0
#my gemfile
source 'https://rubygems.org'
ruby "2.2.0"
gem 'rails', '4.2.0'
gem 'linkedin-scraper'
Another comment: when testing the gem directly in irb, seems work fine. It looks like rails doesn't recognize your gem. Just a thought, but shoudn't your profile.rb file be named linkedin.rb ?
I switched to version '0.1.5' and it works.
There's an issue in the latest version (0.1.7 too), it seems to be a conflict with rails (railties)
Thanks I guess the change in name caused issue
On Tue, Dec 22, 2015 at 6:55 AM -0800, "Brice M." notifications@github.com wrote:
I switched to version '0.1.5' and it works.
There's an issue in the latest version (0.1.7 too), it seems to be a conflict with rails (railties)
— Reply to this email directly or view it on GitHub.
Which name ? Are you fixing this ?
Try addling
require 'linkedin_scraper'
before using the command. Or you can add it inside config/initializers
Hello Yatish,
Thanks a lot for creating this great gem. And even more for taking the time to maintain it...
I used it in a previous app, and it worked fine. In this new one (rails), i'm facing a strange issue that I don't understand. When trying to get a profile's data (rails c / s), I get the following error:
Would you have any idea how to solve this ?
Thanks a lot, Brice