title: page.rb:220: warning: encountered \r in middle of line, treated as a mere space on Mac
body: <p>I am trying to run a test in ruby cucumber, selenium webdriver, framework. The tests were written in windows machine and I am using Mac. I am getting the following error. I found at this Git hub link - <a href="https://github.com/rdoc/rdoc/pull/280" rel="nofollow">https://github.com/rdoc/rdoc/pull/280</a> 
  that this can be fixed. I understood that I need to install "kpeg gem" which I did but it did not resolve the issue. </p>
  
  <p>Could you please help? I want to know the steps to fix it incase you better understand the documentation on the link provided. I will greatly appreciate.</p>
  
  <pre><code>a3835233:astra yc98ag2$ cucumber --profile  pom_mcom_qa_new_ui --tags  @bat
  /Users/yc98ag2/Documents/Git/astra/lib/new_ui/pages/mew2/catsplash_page.rb:220: warning: encountered \r in middle of line, treated as a mere space
  /Users/yc98ag2/Documents/Git/astra/lib/new_ui/pages/mew2/dbconpage.rb:55: warning: encountered \r in middle of line, treated as a mere space
  /Users/yc98ag2/Documents/Git/astra/lib/new_ui/pages/mew2/hpmb_add_mediagrp_id.rb:83: warning: encountered \r in middle of line, treated as a mere space
  /Users/yc98ag2/Documents/Git/astra/lib/new_ui/pages/mew2/mew_promos_bcom.rb:161: warning: encountered \r in middle of line, treated as a mere space
  /Users/yc98ag2/Documents/Git/astra/lib/pages/mew2/catsplash_page.rb:220: warning: encountered \r in middle of line, treated as a mere space
  /Users/yc98ag2/Documents/Git/astra/lib/pages/mew2/dbconpage.rb:55: warning: encountered \r in middle of line, treated as a mere space
  /Users/yc98ag2/Documents/Git/astra/lib/pages/mew2/hpmb_add_mediagrp_id.rb:83: warning: encountered \r in middle of line, treated as a mere space
  /Users/yc98ag2/Documents/Git/astra/lib/pages/mew2/mew_promos_bcom.rb:161: warning: encountered \r in middle of line, treated as a mere space
  including Capybara::DSL in the global scope is not recommended!
  Warning: you should require 'minitest/autorun' instead.
  Warning: or add 'gem "minitest"' before 'require "minitest/autorun"'
  From:
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in `block in require'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in `load_dependency'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in `require'
    /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:1:in `&lt;top (required)&gt;'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in `block in require'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in `load_dependency'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in `require'
    /Users/yc98ag2/Documents/Git/astra/features/step_definitions/oes_steps.rb:2:in `&lt;top (required)&gt;'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:in `load'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:in `block in load'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in `load_dependency'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:in `load'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:180:in `load_file'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:82:in `each'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime.rb:184:in `load_step_definitions'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime.rb:42:in `run!'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/cli/main.rb:47:in `execute!'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/bin/cucumber:13:in `&lt;top (required)&gt;'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/cucumber:23:in `load'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/cucumber:23:in `&lt;main&gt;'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
    /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
  MiniTest::Unit::TestCase is now Minitest::Test. From /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit/testcase.rb:8:in `&lt;module:Unit&gt;'
  undefined method `_run_suite' for class `Test::Unit::Runner' (NameError)
  /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:676:in `&lt;class:Runner&gt;'
  /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:261:in `&lt;module:Unit&gt;'
  /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:15:in `&lt;module:Test&gt;'
  /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/test/unit.rb:7:in `&lt;top (required)&gt;'
  /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /Users/yc98ag2/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in `block in require'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in `load_dependency'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in `require'
  /Users/yc98ag2/Documents/Git/astra/features/step_definitions/oes_steps.rb:2:in `&lt;top (required)&gt;'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:in `load'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:in `block in load'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in `load_dependency'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:241:in `load'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/rb_support/rb_language.rb:95:in `load_code_file'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:180:in `load_file'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:83:in `block in load_files!'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:82:in `each'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime/support_code.rb:82:in `load_files!'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime.rb:184:in `load_step_definitions'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/runtime.rb:42:in `run!'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/lib/cucumber/cli/main.rb:47:in `execute!'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/gems/cucumber-1.3.15/bin/cucumber:13:in `&lt;top (required)&gt;'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/cucumber:23:in `load'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/cucumber:23:in `&lt;main&gt;'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `eval'
  /Users/yc98ag2/.rvm/gems/ruby-2.1.2/bin/ruby_executable_hooks:15:in `&lt;main&gt;'
  </code></pre>
  
  <p>@Uri How can i tell looking at the following code that which lines have endings from windows style (\r\n).. for ex - the first line of error comes from the last line of this code which is sleep 5
  Isn't there any workaround which makes it work for both windows and mac? coz i am working on a project in office where most of the guys are working on windows.</p>
  
  <pre><code>def click_verify_innerpool(table)
    Log.instance.info("Entering method: click_verify_max_innerpool_symbol()")
    sleep 5
    table.hashes.each do |hash|
      var1=hash['container']
      in_frame(:name =&gt; 'formframe') do |frame|
        Log.instance.debug("Inside the '"+$xpath['frm_frame']+"' frame")
        click_pool_sequence[var1]
        if var1=='MEW2_CS_MEN'
          for i in 1..3
            con_men_btn
            sleep 5
  
          end
        end
  </code></pre>