sauce-archives / sauce_ruby

This is the Ruby client adapter for testing with Sauce Labs, a Selenium-based browser testing service (saucelabs.com).
Apache License 2.0
98 stars 115 forks source link

Rake tasks not found #217

Open adambarthelson opened 10 years ago

adambarthelson commented 10 years ago

Literally trying the first couple steps of setup.

When suddenly:

bundle exec rake sauce:install:spec
rake aborted!
Don't know how to build task 'sauce:install:spec'
imurchie commented 10 years ago

What version of the gems are you using?

adambarthelson commented 10 years ago

Ah, seems a little dated when running the default. I'll require a newer version.

    sauce (2.5.2)
      childprocess (>= 0.1.6)
      cmdparse (>= 2.0.2)
      highline (>= 1.5.0)
      json (>= 1.2.0)
      net-http-persistent
      net-ssh
      net-ssh-gateway
      rest-client
      sauce_whisk (= 0.0.3)
      selenium-webdriver (>= 0.1.2)
    sauce-connect (2.5.0)
      sauce (~> 2.5.0)
    sauce_whisk (0.0.3)
      rest-client
adambarthelson commented 10 years ago

Moved up to 3.3.2, no dice.

imurchie commented 10 years ago

Can you paste your whole Gemfile.lock here? I'm unable to not find the task locally.

On Fri, Mar 14, 2014 at 1:12 PM, Adam Barthelson notifications@github.comwrote:

Moved up to 3.3.2, no dice.

— Reply to this email directly or view it on GitHubhttps://github.com/saucelabs/sauce_ruby/issues/217#issuecomment-37690289 .

adambarthelson commented 10 years ago

Running an older setup, Rails 3.2.17, Ruby 1.9.3 falcon patched.

derp
imurchie commented 10 years ago

Maybe I'm missing something here, but you don't have the sauce gem in here. Where did you install it?

adambarthelson commented 10 years ago

Hah, woops. Must have been in another branch when I copied.


GIT
  remote: git://github.com/nixme/pry-debugger.git
  revision: 4cd384a7d69a10f0f8fe5a8700e5a33ed7464b73
  specs:
    pry-debugger (0.2.2)
      debugger (~> 1.3)
      pry (>= 0.9.10)

GEM
  remote: http://rubygems.org/
  specs:
    actionmailer (3.2.17)
      actionpack (= 3.2.17)
      mail (~> 2.5.4)
    actionpack (3.2.17)
      activemodel (= 3.2.17)
      activesupport (= 3.2.17)
      builder (~> 3.0.0)
      erubis (~> 2.7.0)
      journey (~> 1.0.4)
      rack (~> 1.4.5)
      rack-cache (~> 1.2)
      rack-test (~> 0.6.1)
      sprockets (~> 2.2.1)
    activemodel (3.2.17)
      activesupport (= 3.2.17)
      builder (~> 3.0.0)
    activerecord (3.2.17)
      activemodel (= 3.2.17)
      activesupport (= 3.2.17)
      arel (~> 3.0.2)
      tzinfo (~> 0.3.29)
    activeresource (3.2.17)
      activemodel (= 3.2.17)
      activesupport (= 3.2.17)
    activesupport (3.2.17)
      i18n (~> 0.6, >= 0.6.4)
      multi_json (~> 1.0)
    acts-as-taggable-on (2.3.3)
      rails (~> 3.0)
    addressable (2.3.5)
    arel (3.0.3)
    atomic (1.1.15)
    awesome_print (1.2.0)
    aws-sdk (1.36.1)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
      uuidtools (~> 2.1)
    balanced (0.7.4)
      faraday (>= 0.8.6)
      faraday_middleware (~> 0.9.0)
    bcrypt (3.1.7)
    bcrypt-ruby (3.1.5)
      bcrypt (>= 3.1.3)
    better_errors (1.1.0)
      coderay (>= 1.0.0)
      erubis (>= 2.6.6)
    binding_of_caller (0.7.2)
      debug_inspector (>= 0.0.1)
    bootstrap-sass (2.3.2.0)
      sass (~> 3.2)
    bootstrap-wysihtml5-rails (0.3.1.23)
      railties (>= 3.0)
    bootstrap_form (0.3.2)
    builder (3.0.4)
    cancan (1.6.10)
    capybara (2.1.0)
      mime-types (>= 1.16)
      nokogiri (>= 1.3.3)
      rack (>= 1.0.0)
      rack-test (>= 0.5.4)
      xpath (~> 2.0)
    carrierwave (0.10.0)
      activemodel (>= 3.2.0)
      activesupport (>= 3.2.0)
      json (>= 1.7)
      mime-types (>= 1.16)
    cells (3.10.0)
      actionpack (>= 3.0)
      railties (>= 3.0)
      uber (~> 0.0.4)
    celluloid (0.15.2)
      timers (~> 1.1.0)
    celluloid-io (0.15.0)
      celluloid (>= 0.15.0)
      nio4r (>= 0.5.0)
    childprocess (0.5.1)
      ffi (~> 1.0, >= 1.0.11)
    chronic (0.10.2)
    client_side_validations (3.2.6)
    climate_control (0.0.3)
      activesupport (>= 3.0)
    cmdparse (2.0.5)
    cocaine (0.5.3)
      climate_control (>= 0.0.3, < 1.0)
    coderay (1.1.0)
    coffee-rails (3.2.2)
      coffee-script (>= 2.2.0)
      railties (~> 3.2.0)
    coffee-script (2.2.0)
      coffee-script-source
      execjs
    coffee-script-source (1.7.0)
    columnize (0.3.6)
    combined_time_select (1.0.1)
    commonjs (0.2.7)
    crack (0.4.2)
      safe_yaml (~> 1.0.0)
    cucumber (1.3.11)
      builder (>= 2.1.2)
      diff-lcs (>= 1.1.3)
      gherkin (~> 2.12)
      multi_json (>= 1.7.5, < 2.0)
      multi_test (>= 0.0.2)
    cucumber-rails (1.4.0)
      capybara (>= 1.1.2)
      cucumber (>= 1.2.0)
      nokogiri (>= 1.5.0)
      rails (>= 3.0.0)
    daemons (1.1.9)
    database_cleaner (1.2.0)
    debug_inspector (0.0.2)
    debugger (1.6.6)
      columnize (>= 0.3.1)
      debugger-linecache (~> 1.2.0)
      debugger-ruby_core_source (~> 1.3.2)
    debugger-linecache (1.2.0)
    debugger-ruby_core_source (1.3.2)
    delayed_job (4.0.0)
      activesupport (>= 3.0, < 4.1)
    delayed_job_active_record (4.0.0)
      activerecord (>= 3.0, < 4.1)
      delayed_job (>= 3.0, < 4.1)
    devise (3.2.3)
      bcrypt-ruby (~> 3.0)
      orm_adapter (~> 0.1)
      railties (>= 3.2.6, < 5)
      thread_safe (~> 0.1)
      warden (~> 1.2.3)
    diff-lcs (1.2.5)
    email_spec (1.5.0)
      launchy (~> 2.1)
      mail (~> 2.2)
    erubis (2.7.0)
    eventmachine (1.0.3)
    excon (0.32.1)
    execjs (2.0.2)
    factory_girl (4.4.0)
      activesupport (>= 3.0.0)
    factory_girl_rails (4.4.1)
      factory_girl (~> 4.4.0)
      railties (>= 3.0.0)
    faraday (0.8.9)
      multipart-post (~> 1.2.0)
    faraday_middleware (0.9.0)
      faraday (>= 0.7.4, < 0.9)
    ffi (1.9.3)
    figaro (0.7.0)
      bundler (~> 1.0)
      rails (>= 3, < 5)
    font-awesome-rails (3.2.1.3)
      railties (>= 3.2, < 5.0)
    foreigner (1.6.1)
      activerecord (>= 3.0.0)
    formatador (0.2.4)
    fullcalendar-rails (1.6.4.0)
    geocoder (1.1.9)
    gherkin (2.12.2)
      multi_json (~> 1.3)
    gmaps4rails (2.1.2)
    guard (2.5.1)
      formatador (>= 0.2.4)
      listen (~> 2.6)
      lumberjack (~> 1.0)
      pry (>= 0.9.12)
      thor (>= 0.18.1)
    guard-rspec (4.2.8)
      guard (~> 2.1)
      rspec (>= 2.14, < 4.0)
    guard-zeus (2.0.0)
      guard (~> 2.0)
      zeus (~> 0)
    hashie (2.0.5)
    highline (1.6.21)
    hike (1.2.3)
    httparty (0.13.0)
      json (~> 1.8)
      multi_xml (>= 0.5.2)
    i18n (0.6.9)
    jbuilder (2.0.4)
      activesupport (>= 3.0.0)
      multi_json (>= 1.2.0)
    journey (1.0.4)
    jquery-rails (3.1.0)
      railties (>= 3.0, < 5.0)
      thor (>= 0.14, < 2.0)
    jquery-ui-rails (4.2.0)
      railties (>= 3.2.16)
    jquery_datepicker (0.4)
    json (1.8.1)
    jwt (0.1.11)
      multi_json (>= 1.5)
    kaminari (0.15.1)
      actionpack (>= 3.0.0)
      activesupport (>= 3.0.0)
    kgio (2.9.2)
    launchy (2.4.2)
      addressable (~> 2.3)
    less (2.5.0)
      commonjs (~> 0.2.7)
    less-rails (2.5.0)
      actionpack (>= 3.1)
      less (~> 2.5.0)
    libv8 (3.16.14.3)
    listen (2.7.1)
      celluloid (>= 0.15.2)
      celluloid-io (>= 0.15.0)
      rb-fsevent (>= 0.9.3)
      rb-inotify (>= 0.9)
    lumberjack (1.0.4)
    mail (2.5.4)
      mime-types (~> 1.16)
      treetop (~> 1.4.8)
    make_permalink (0.2.0)
      stringex (~> 1.3.0)
    mandrill-api (1.0.51)
      excon (>= 0.16.0, < 1.0)
      json (>= 1.7.7, < 2.0)
    masked_input-rails (1.1.0)
      railties (~> 3.1)
    method_source (0.8.2)
    mime-types (1.25.1)
    mini_portile (0.5.2)
    multi_json (1.9.0)
    multi_test (0.0.3)
    multi_xml (0.5.5)
    multipart-post (1.2.0)
    net-http-persistent (2.9.4)
    net-ssh (2.8.0)
    net-ssh-gateway (1.2.0)
      net-ssh (>= 2.6.5)
    newrelic_rpm (3.7.3.204)
    nifty-generators (0.4.6)
    nio4r (1.0.0)
    nokogiri (1.6.1)
      mini_portile (~> 0.5.0)
    oauth (0.4.7)
    oauth2 (0.9.3)
      faraday (>= 0.8, < 0.10)
      jwt (~> 0.1.8)
      multi_json (~> 1.3)
      multi_xml (~> 0.5)
      rack (~> 1.2)
    omniauth (1.2.1)
      hashie (>= 1.2, < 3)
      rack (~> 1.0)
    omniauth-facebook (1.6.0)
      omniauth-oauth2 (~> 1.1)
    omniauth-google-oauth2 (0.2.2)
      omniauth (~> 1.0)
      omniauth-oauth2
    omniauth-oauth (1.0.1)
      oauth
      omniauth (~> 1.0)
    omniauth-oauth2 (1.1.2)
      faraday (>= 0.8, < 0.10)
      multi_json (~> 1.3)
      oauth2 (~> 0.9.3)
      omniauth (~> 1.2)
    omniauth-twitter (1.0.1)
      multi_json (~> 1.3)
      omniauth-oauth (~> 1.0)
    orm_adapter (0.5.0)
    paperclip (4.1.1)
      activemodel (>= 3.0.0)
      activesupport (>= 3.0.0)
      cocaine (~> 0.5.3)
      mime-types
    parallel (0.9.2)
    parallel_tests (0.16.6)
      parallel
    pg (0.17.1)
    polyamorous (0.6.4)
      activerecord (>= 3.0)
    polyglot (0.3.4)
    profanity_filter (0.1.1)
    pry (0.9.12.6)
      coderay (~> 1.0)
      method_source (~> 0.8)
      slop (~> 3.4)
    quiet_assets (1.0.2)
      railties (>= 3.1, < 5.0)
    rack (1.4.5)
    rack-cache (1.2)
      rack (>= 0.4)
    rack-ssl (1.3.3)
      rack
    rack-test (0.6.2)
      rack (>= 1.0)
    rails (3.2.17)
      actionmailer (= 3.2.17)
      actionpack (= 3.2.17)
      activerecord (= 3.2.17)
      activeresource (= 3.2.17)
      activesupport (= 3.2.17)
      bundler (~> 1.0)
      railties (= 3.2.17)
    railties (3.2.17)
      actionpack (= 3.2.17)
      activesupport (= 3.2.17)
      rack-ssl (~> 1.3.2)
      rake (>= 0.8.7)
      rdoc (~> 3.4)
      thor (>= 0.14.6, < 2.0)
    raindrops (0.13.0)
    rake (10.1.1)
    ransack (1.1.0)
      actionpack (>= 3.0)
      activerecord (>= 3.0)
      polyamorous (~> 0.6.0)
    rb-fsevent (0.9.4)
    rb-inotify (0.9.3)
      ffi (>= 0.5.0)
    rdoc (3.12.2)
      json (~> 1.4)
    ref (1.0.5)
    remotipart (1.2.1)
    rest-client (1.6.7)
      mime-types (>= 1.16)
    rmagick (2.13.2)
    rolify (3.2.0)
    rspec (2.14.1)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    rspec-core (2.14.8)
    rspec-expectations (2.14.5)
      diff-lcs (>= 1.1.3, < 2.0)
    rspec-mocks (2.14.6)
    rspec-rails (2.14.1)
      actionpack (>= 3.0)
      activemodel (>= 3.0)
      activesupport (>= 3.0)
      railties (>= 3.0)
      rspec-core (~> 2.14.0)
      rspec-expectations (~> 2.14.0)
      rspec-mocks (~> 2.14.0)
    rubyzip (1.1.0)
    safe_yaml (1.0.1)
    sass (3.3.3)
    sass-rails (3.2.6)
      railties (~> 3.2.0)
      sass (>= 3.1.10)
      tilt (~> 1.3)
    sauce (3.3.2)
      childprocess (>= 0.1.6)
      cmdparse (>= 2.0.2)
      highline (>= 1.5.0)
      json (>= 1.2.0)
      net-http-persistent
      net-ssh
      net-ssh-gateway
      parallel_tests (= 0.16.6)
      rest-client
      sauce_whisk (~> 0.0.11)
      selenium-webdriver (>= 0.1.2)
    sauce-connect (3.3.1)
      sauce (~> 3.3)
    sauce_whisk (0.0.12)
      rest-client
    selenium-webdriver (2.40.0)
      childprocess (>= 0.5.0)
      multi_json (~> 1.0)
      rubyzip (~> 1.0)
      websocket (~> 1.0.4)
    shoulda-matchers (2.5.0)
      activesupport (>= 3.0.0)
    simple_form (2.1.1)
      actionpack (~> 3.0)
      activemodel (~> 3.0)
    slop (3.5.0)
    sprockets (2.2.2)
      hike (~> 1.2)
      multi_json (~> 1.0)
      rack (~> 1.0)
      tilt (~> 1.1, != 1.3.0)
    stringex (1.3.3)
    stripe (1.10.1)
      json (~> 1.8.1)
      mime-types (~> 1.25)
      rest-client (~> 1.4)
    stripe_event (1.1.0)
      activesupport (>= 3.1)
      stripe (~> 1.6)
    tagsinput-rails (1.3.3.2)
      railties (>= 3.1, < 4.1)
    terminal-notifier-guard (1.5.3)
    therubyracer (0.12.1)
      libv8 (~> 3.16.14.0)
      ref
    thin (1.6.2)
      daemons (>= 1.0.9)
      eventmachine (>= 1.0.0)
      rack (>= 1.0.0)
    thor (0.18.1)
    thread_safe (0.2.0)
      atomic (>= 1.1.7, < 2)
    tilt (1.4.1)
    timers (1.1.0)
    treetop (1.4.15)
      polyglot
      polyglot (>= 0.3.1)
    turbo-sprockets-rails3 (0.3.11)
      railties (> 3.2.8, < 4.0.0)
      sprockets (>= 2.2.0)
    tzinfo (0.3.39)
    uber (0.0.4)
    uglifier (2.5.0)
      execjs (>= 0.3.0)
      json (>= 1.8.0)
    unf (0.1.3)
      unf_ext
    unf_ext (0.0.6)
    unicorn (4.8.2)
      kgio (~> 2.6)
      rack
      raindrops (~> 0.7)
    uuidtools (2.1.4)
    warden (1.2.3)
      rack (>= 1.0)
    webmock (1.17.4)
      addressable (>= 2.2.7)
      crack (>= 0.3.2)
    websocket (1.0.7)
    xpath (2.0.0)
      nokogiri (~> 1.3)
    zeus (0.13.3)
      method_source (>= 0.6.7)
    zeus-parallel_tests (0.2.4)
      parallel_tests (>= 0.11.3)
      zeus (~> 0.13.3)

PLATFORMS
  ruby

DEPENDENCIES
  acts-as-taggable-on (~> 2.3.1)
  awesome_print
  aws-sdk
  balanced (= 0.7.4)
  better_errors
  binding_of_caller
  bootstrap-sass (= 2.3.2.0)
  bootstrap-wysihtml5-rails
  bootstrap_form (~> 0.3.2)
  builder
  cancan
  capybara (= 2.1.0)
  cells
  chronic (~> 0.10.2)
  client_side_validations
  coffee-rails (~> 3.2.1)
  combined_time_select (~> 1.0.1)
  cucumber-rails
  daemons
  database_cleaner
  delayed_job_active_record
  devise
  email_spec
  factory_girl_rails
  faraday (= 0.8.9)
  faraday_middleware
  figaro
  font-awesome-rails (~> 3.2.1.3)
  fullcalendar-rails
  geocoder
  gmaps4rails
  guard-rspec
  guard-zeus
  httparty
  jbuilder
  jquery-rails
  jquery-ui-rails
  jquery_datepicker
  json
  kaminari
  launchy
  less-rails
  mailboxer!
  make_permalink (~> 0.2.0)
  mandrill-api
  masked_input-rails
  newrelic_rpm
  nifty-generators
  omniauth-facebook
  omniauth-google-oauth2
  omniauth-twitter
  paperclip
  parallel_tests
  pg
  profanity_filter
  pry-debugger!
  quiet_assets
  rails (= 3.2.17)
  ransack
  remotipart (~> 1.2)
  rmagick
  rolify (= 3.2.0)
  rspec-rails
  sass-rails (~> 3.2.3)
  sauce (~> 3.3.0)
  sauce-connect
  shoulda-matchers
  simple_form
  stripe
  stripe_event
  tagsinput-rails
  terminal-notifier-guard
  therubyracer
  thin
  turbo-sprockets-rails3
  uglifier (>= 1.0.3)
  unf
  unicorn
  webmock
  zeus-parallel_tests
imurchie commented 10 years ago

Hmm. With the same setup things work for me. Is there something funny in your environment? Can you find any of the sauce tasks?

adambarthelson commented 10 years ago

Just revisited the issue. I checked out a new branch, freshly bundled and the same steps, same issue. I've also tried installing the gems in top level scope vs. :test. rake -T | grep sauce returns nothing. Can't think of anything in my environment that would interfere?

adambarthelson commented 10 years ago

I forked sauce and added a railtie to require rake tasks, then tried requiring my fork/branch instead. Rake tasks actually worked this time given the update.

Take a look: https://github.com/adambarthelson/sauce_ruby/commit/13e5902b09841094e41a90f37f3039ef5a46385a If it looks alright I'll open a PR.

imurchie commented 10 years ago

This works from a cursory glance. I would open a PR.

Thanks! (And sorry for the delay, and the Rake problems.)

adambarthelson commented 10 years ago

Had some tests fail, hmm

imurchie commented 10 years ago

Yup. Because the tests in Travis aren't running in Rails.

On Wed, Mar 26, 2014 at 3:20 PM, Adam Barthelson notifications@github.comwrote:

Had some tests fail, hmm

— Reply to this email directly or view it on GitHubhttps://github.com/saucelabs/sauce_ruby/issues/217#issuecomment-38747756 .

adambarthelson commented 10 years ago

:+1:

imurchie commented 10 years ago

You could add the normal requires if Rails isn't defined. If the Railtie bit fixes the Rails integration, that would leave the rest as it currently is.

On Wed, Mar 26, 2014 at 4:00 PM, Adam Barthelson notifications@github.comwrote:

[image: :+1:]

— Reply to this email directly or view it on GitHubhttps://github.com/saucelabs/sauce_ruby/issues/217#issuecomment-38751305 .

DylanLacey commented 10 years ago

That's super weird. I thought that rake with rails would auto-require all of the gems in the Bundle, which is why I've never had this issue. That, or black necromancy. But it seems you're right, the Rails Docs suggest using a railtie.

I'm just going to echo @imurchie's comments over on your PR, and we can merge it once it passes! (Or gets close, hunting down test flakiness is something we're still doing)

nobuf commented 10 years ago

I was facing the same error and noticed that gem 'sauce' should be in group :development or any environment you run rake.

The above fix seems included in v3.4.2. Note that https://saucelabs.com/docs/onboarding apparently a bit outdated it uses gem 'sauce', '~> 3.1.1'.

om-nishu-trantor commented 9 years ago

If you have tried version upgrade and still face the issue, try following :-

RAILS_ENV=test bundle exec rake sauce:install:spec
blisitsin commented 8 years ago

I have the same issue with 'sauce', '3.7.1'

thestumonkey commented 7 years ago

Also getting same issues with sauce 3.7.2. Can't see any of the rake tasks, just the ones in my own Rakefile.