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

  • Home
  • SEARCH
  • 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 3999162
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:37:17+00:00 2026-05-20T07:37:17+00:00

file = [file1,file2,…].join( ) `paste #{file}` Hello, I have this simple problem that has

  • 0
file = ["file1","file2",...].join(" ")

`paste "#{file}"`

Hello, I have this simple problem that has been bugging me for days. I want to use Ruby to select files to paste together, but when I use the above code, it returns saying that files are not found. If I run for a single file, e.g. paste file1, it works. Does someone see why the code isn’t working?

Thanks in advance

  • 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-05-20T07:37:17+00:00Added an answer on May 20, 2026 at 7:37 am

    It’s because you quote #{file}. The thing that is executed is paste "file1 file2".

    You probably want paste #{file} which would result in paste file1 file2. In your case, paste expects a file that is called “file1 file2” (filename with a space).

    In other words, remove the double quotes in your second line.

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

Sidebar

Related Questions

For example, if I have two files: file1: This is file 1 and file2:
I have some code that effectively does this : File file = new File(C:\\Program
I have two Java.io.File objects file1 and file2. I want to copy the contents
Can someone help me figure out the following make file? BINS=file1 file2 file3 all:
Given the following xml fragment: <Problems> <Problem> <File>file1</File> <Description>desc1</Description> </Problem> <Problem> <File>file1</File> <Description>desc2</Description> </Problem>
I have an element like this: <span class=tool_tip title=The full title>The ful&#8230;</span> This seems
Menu style: File . Tool -file1 -tool1 -file2 -tool2 -file3 -tool3 datable contains the
Suppose I've got a list of files file1 file 1 file2 a for...in loop
under /tmp directory I have the following files file1 file2 when I run the
I have 5 files file1.txt file2.txt....file5.txt then I have list of 3 words red

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.