Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9158671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:18:13+00:00 2026-06-17T13:18:13+00:00

3.2.0 :002 > File.exists?("xyz") (irb):2:in `<main>’: undefined method `exists?’ for File:Class (NoMethodError) Did you

  • 0
   3.2.0 :002 > File.exists?("xyz")
(irb):2:in `<main>': undefined method `exists?' for File:Class (NoMethodError)
Did you mean?  exist?                             
        from /Users/jason/.rvm/rubies/ruby-3.2.0/lib/ruby/gems/3.2.0/gems/irb-1.6.2/exe/irb:11:in `<top (required)>'
        from /Users/jason/.rvm/rubies/ruby-3.2.0/bin/irb:25:in `load'
        from /Users/jason/.rvm/rubies/ruby-3.2.0/bin/irb:25:in `<main>'
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:18:14+00:00Added an answer on June 17, 2026 at 1:18 pm

    You forgot the question mark (?) at the end:

    File.exist? 'foo'
    File.exists? 'foo'
    

    In general, methods which answer questions will always end with a question mark.

    In this case, the method is asking File the does 'foo' exist? question. The class will return the answer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got text file that contains 1 000 002 numbers in following formation: 123
if I have a text file like this: [001]This is line 1. [002][too long]This
I have a text file that looks like this: Id:001;status:open;Id:002;status:open;Id:003;status:closed; Id:004;status:open;Id:005;status:closed;Id:006;status:open; .... .... Here
i have a function what separate my file's content. Example file: 001;text1 002;text2 003;text3
When I do ruby-1.9.2-p180 :002 > Curl::Multi.download([http://www.bbc.com]) => nil The downloaded file is of
1.products (Products Table) 1.productid 001 002 003 2.productname x y z 2.invoiceqty (InvoiceQuantity Table)
Table1 ID Loc ----------- 001 null 002 null 003 PYD 004 null .... Table2
Using SQL Server 2000 Table PersonID Date 001 11-02-2009 002 11-02-2009 003 11-02-2009 001
Using Access 2003 Table1 ID Name Value 001 Raja 100 002 Ramu 200 004
Using Crystal Report 7 ID Value 001 100 002 200 003 400 004 500

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.