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 8362787
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T12:01:19+00:00 2026-06-09T12:01:19+00:00

cmd = snv co #{rep} –username #{svn_user} –password #{pxs} puts cmd # this code

  • 0
cmd = "snv co #{rep} --username #{svn_user} --password #{pxs}" 

puts cmd  # this code wotks and prints all vars values normally

exec(cmd)   
xpto.rb:69:in `exec': string contains null byte (ArgumentError)
    from xpto.rb:69
$ ruby -v
ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-linux]
$ gem -v
1.3.7

Whats going on? How can I solve this?

  • 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-09T12:01:21+00:00Added an answer on June 9, 2026 at 12:01 pm

    Your cmd string has got a null (i.e. zero) byte in it somehow. Using puts won’t show up any null bytes, they’ll just be left out of the output:

    1.8.7 :001 > exec "\0"
    ArgumentError: string contains null byte
            from (irb):1:in `exec'
            from (irb):1
    1.8.7 :002 > puts "n\0n"
    nn
     => nil 
    

    You should probably check how your rep, svn_user and pxs variables are being populated to see if you can track down the source of these null bytes, but as a quick fix you could use gsub! to remove them:

    cmd.gsub!(/\0/, '')
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my string [cmd][lPrt][brd][0][{\points\:[\326, 191\,\327, 191\,\328, 189\,\328, 176\,\328, 150\,\328, 124\,\316, 93\,\287, 79\,\199, 76\,\154,
MySQL CMD Client will run this file but get half way through and complain
Given the code : SQLiteCommand cmd = new SQLiteCommand(UPDATE \Category\ SET \name\=?name, \description\=?description, \color\=?color,
I know about cmd-double-click , and use it all the time, it's great. But
I have cmd like this one: java Test -p 127.0.0.1:8080 -d D:\Desktop\temp.exe -o mingw
i have the following code: def cmds(cmd): cmd= Popen(cmd, shell=True, stdout=PIPE) lines = command.stdout.read().splitlines()
print exit code in cmd in windows os ....some command return exit code ...where
When i use this cmd line : jar cmf arshad.mf ars.jar *.class i get
I am working with the cmd class in python and it passes me all
myprogram.cmd is in PATH; myprogram.cmd uses %~dp0 to determine the folder it is in;

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.