|
Replies:
4
-
Pages:
1
-
Last Post:
Oct 27, 2008 9:12 AM
by: marcric
|
|
|
Posts:
2
From:
Birkhenhead, Merseyside, UK
Registered:
4/29/08
|
|
|
|
Need to lose the Microsoft `smart quotes' in the code examples
Posted:
Apr 29, 2008 7:41 AM
|
|
It really grates and also means that any attempt to cut and paste from the PDF would fail.
|
|
Posts:
8
From:
Oakland
Registered:
6/26/08
|
|
|
|
Re: Need to lose the Microsoft `smart quotes' in the code examples
Posted:
Jun 26, 2008 3:48 AM
in response to:
fjfish
|
|
Working on it.
|
|
Posts:
12
From:
Rio de Janeiro, Brazil
Registered:
9/28/08
|
|
|
|
Re: Need to lose the Microsoft `smart quotes' in the code examples
Posted:
Sep 28, 2008 11:29 PM
in response to:
assaf
|
|
I have downloaded the samples code today and get that kind of error on "CH2\2.4.1":
E:\Ruby in Practice\Code\CH2\2.4.1>ruby ps_checker_with_fixture.rb Loaded suite ps_checker_with_fixture Started EE Finished in 0.015 seconds.
1) Error: test_initialized(TestProcessChecker): Errno::ENOENT: No such file or directory - ps -A ./process_checker.rb:3:in ``' ./process_checker.rb:3:in `initialize' ps_checker_with_fixture.rb:6:in `new' ps_checker_with_fixture.rb:6:in `setup'
2) Error: test_rails_server(TestProcessChecker): Errno::ENOENT: No such file or directory - ps -A ./process_checker.rb:3:in ``' ./process_checker.rb:3:in `initialize' ps_checker_with_fixture.rb:6:in `new' ps_checker_with_fixture.rb:6:in `setup'
2 tests, 0 assertions, 0 failures, 2 errors
I have changed the file "process_checker.rb" taking out the smart quotes, and get it right:
E:\Ruby in Practice\Code\CH2\2.4.1>ruby ps_checker_with_fixture.rb Loaded suite ps_checker_with_fixture Started .. Finished in 0.0 seconds.
2 tests, 2 assertions, 0 failures, 0 errors
E:\Ruby in Practice\Code\CH2\2.4.1>
|
|
Posts:
8
From:
Oakland
Registered:
6/26/08
|
|
|
|
Re: Need to lose the Microsoft `smart quotes' in the code examples
Posted:
Sep 29, 2008 11:53 PM
in response to:
marcric
|
|
Marcic, these look like but are not accidental smartquotes. In Ruby you can use the backtick to execute a command and capture its output, so `ps -A` runs the ps command, which lists all running processes, and returns that list as a string.
Windows doesn't have the ps command, contrary to what the README file says. I changed the README file to be clearer about that.
|
|
Posts:
12
From:
Rio de Janeiro, Brazil
Registered:
9/28/08
|
|
|
|
Re: Need to lose the Microsoft `smart quotes' in the code examples
Posted:
Oct 27, 2008 9:12 AM
in response to:
assaf
|
|
Hi Assaf,
Sorry to miss the backtick meaning.
But we have a similar command in Windows should be: `mem /c `
I works fine for me.
Regards.
|
|
|
Legend
|
|
Gold: 300
+
pts
|
|
Silver: 100
- 299
pts
|
|
Bronze: 25
- 99
pts
|
|
Manning Author
|
|
Manning Staff
|
|