tarraschk / TinderAutoLike

Tinder Auto Like with Ruby - Applying A/B testing on human relationships
MIT License
65 stars 17 forks source link

TinderAutoLike.rb:24:in `<main>': undefined local variable or method `‘adam' for main:Object (NameError) #5

Closed Mango200 closed 8 years ago

Mango200 commented 9 years ago

TinderAutoLike.rb:24:in <main>': undefined local variable or method‘adam' for main:Object (NameError) Adams-Air:TinderAutoLike-master adamwebb$

So I've followed the instructions I CD into my Downloads CD Directory where it's stored bundle Install bundle exec ruby TinderAutoLike.rb

I've set my username and pw for example to adam.something@gmail.com Password1

and doesn't work.

tarraschk commented 9 years ago

Hey Adam,

I think that you wrote:

myLogin = adam.something@gmail.com
myPassword = Password1

didn't you?

In that case, you just forgot the quotes around your email address and password. As a result, Ruby thinks adam is an object/a variable, but as it is undefined it won't work.

You must replace it with:

myLogin = 'adam.something@gmail.com'
myPassword = 'Password1'
Mango200 commented 9 years ago

Ok, that's resolved, I have another issue however;

Adams-MacBook-Air:TinderAutoLike-master adamwebb$ gem install faraday
Successfully installed faraday-0.9.1

Parsing documentation for faraday-0.9.1
Done installing documentation for faraday after 1 seconds
1 gem installed
Adams-MacBook-Air:TinderAutoLike-master adam$ bundle exec ruby TinderAutoLike.rb
TinderAutoLike.rb:30: syntax error, unexpected tIDENTIFIER, expecting end-of-input
require 'faraday'
                ^
Adams-MacBook-Air:TinderAutoLike-master adamwebb$ gem install faraday
Successfully installed faraday-0.9.1
Parsing documentation for faraday-0.9.1
Done installing documentation for faraday after 0 seconds
1 gem installed
Adams-MacBook-Air:TinderAutoLike-master adam$ bundle exec ruby TinderAutoLike.rb
TinderAutoLike.rb:30: syntax error, unexpected tIDENTIFIER, expecting end-of-input
require 'faraday'
                ^

So I've installed faraday using https://rubygems.org/gems/faraday/versions/0.9.1 and the rest from there. any ideas?

tarraschk commented 9 years ago

Did you try with just:

bundle install
bundle exec ruby TinderAutoLike.rb

as specified in the Readme?

Bundler should compute for you the dependencies with bundle install, and you won't need to install manually each gem.

Mango200 commented 9 years ago
Adams-Air:TinderAutoLike-master adamwebb$ bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching version metadata from https://rubygems.org/...
Fetching dependency metadata from https://rubygems.org/..
Using ffi 1.9.10
Using childprocess 0.5.6
Using multipart-post 2.0.0
Installing faraday 0.9.1
Installing faraday_middleware 0.10.0
Installing json 1.8.3 with native extensions
Using multi_json 1.11.2
Using rubyzip 1.1.7
Using websocket 1.2.2
Using selenium-webdriver 2.47.1
Installing watir-webdriver 0.8.0
Using bundler 1.10.6
Bundle complete! 4 Gemfile dependencies, 12 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
Adams-Air:TinderAutoLike-master adamwebb$ bundle exec ruby TinderAutoLike.rb
TinderAutoLike.rb:30: syntax error, unexpected tIDENTIFIER, expecting end-of-input
require 'faraday'
                ^
Adams-Air:TinderAutoLike-master adamwebb$ bundle exec ruby TinderAutoLike.rb

Still not working?

tarraschk commented 9 years ago

Well, that's really weird...

  1. What is your Ruby version?
  2. Have you edited any other line than the Facebook login and password?
  3. If so, could you copy/paste the code here?
Mango200 commented 9 years ago

I've only edited the username and password part as it says In your readme

On 10 September 2015, at 23:48, Maxime Alay-Eddine notifications@github.com wrote:

Well, that's really weird... Have you edited any other line than the Facebook login and password? If so, could you copy/paste the code here?

— Reply to this email directly or view it on GitHub.

Mango200 commented 9 years ago

My ruby version is 2.23, and I have rails installed too.

On 10 September 2015, at 23:48, Maxime Alay-Eddine notifications@github.com wrote:

Well, that's really weird... Have you edited any other line than the Facebook login and password? If so, could you copy/paste the code here?

— Reply to this email directly or view it on GitHub.

tarraschk commented 9 years ago

Okay so it might be an encoding issue.

Did you copy / paste the code of my script, or directly cloned it with git?