I've downloaded and have the Gem for RedCloth 3.0.3 installed.
When I require it ( after require 'rubygems' ) I get a PILE of warning messages about constants that are already defined ...
Anybody have any input on this?
I'd love to have a quiet this stuff down...
j.
Comstants? Strange...
This is what I get:
C:\instiki>ruby -w -e "require 'redcloth'"
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:612: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:832: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:1037: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:815: warning: method redefined; discarding old inline_markdown_link
I've downloaded and have the Gem for RedCloth 3.0.3 installed.
When I require it ( after require 'rubygems' ) I get a PILE of warning messages about constants that are already defined ...
Anybody have any input on this?
I'd love to have a quiet this stuff down...
j.
Comstants? Strange...
This is what I get:
C:\instiki>ruby -w -e "require 'redcloth'"
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:612: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:832: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:1037: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:815: warning: method redefined; discarding old inline_markdown_link
I've downloaded and have the Gem for RedCloth 3.0.3 installed.
When I require it ( after require 'rubygems' ) I get a PILE of warning messages about constants that are already defined ...
Anybody have any input on this?
I'd love to have a quiet this stuff down...
j.
Comstants? Strange...
This is what I get:
C:\instiki>ruby -w -e "require 'redcloth'"
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:612: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:832: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:1037: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:815: warning: method redefined; discarding old inline_markdown_link
I'm guessing that you have redcloth installed both as a gem and as a library, and that it is being required from both locations, and the second require is redefining the constants. Guessing. Heavily.
···
On Aug 18, 2005, at 11:29 PM, Jeff Wood wrote:
Reading your mail further, I tried the same using require_gem 'RedCloth' and don't get all of those messages, why should that make a difference?
Reading your mail further, I tried the same using require_gem 'RedCloth' and don't get all of those messages, why should that make a difference?
I'm guessing that you have redcloth installed both as a gem and as a library, and that it is being required from both locations, and the second require is redefining the constants. Guessing. Heavily.
Aha! I know, I know! Case-insensitive Windows file system strikes again, and this time it bites RubyGems in the stern. Amusing
try require'redcloth' instead (note the lower case!), and see for yourself.
This is a RubyGems bug. To reproduce:
1. Take fresh Ruby install (must be on Windows)
2. Install RubyGems
3. Install RedCloth by gem install redcloth
4. Modify \ruby\lib\ruby\gems\1.8\gems\RedCloth3.0.3\redcloth.rb by adding puts 'HERE' in the beginning.
5. ruby -w -e "require 'RedCloth'"
C:\>ruby -w -e "require 'RedCloth'"
HERE
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:612: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:832: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:1037: warning: amiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:815: warning: method redefined; discarding old inline_markdown_link
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:612: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:832: warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:1037: warning: amiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:169: warning: already initialized constant VERSION
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:170: warning: already initialized constant DEFAULT_RULES
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:242: warning: metod redefined; discarding old initialize
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:254: warning: metod redefined; discarding old to_html
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:311: warning: already initialized constant TEXTILE_TAGS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:324: warning: already initialized constant A_HLGN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:325: warning: already initialized constant A_VLGN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:326: warning: already initialized constant C_CLAS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:327: warning: already initialized constant C_LNGE
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:328: warning: already initialized constant C_STYL
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:329: warning: already initialized constant S_CSPN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:330: warning: already initialized constant S_RSPN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:331: warning: already initialized constant A
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:332: warning: already initialized constant S
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:333: warning: already initialized constant C
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:335: warning: already initialized constant PUNCT
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:336: warning: already initialized constant HYPERLINK
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:342: warning: already initialized constant SIMPLE_HTML_TAGS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:364: warning: already initialized constant GLYPHS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:371: warning: alre
this causes redcloth.rb to be loaded twice - first from ruby/lib/
$ ruby -w -e "require 'rubygems'; require 'RedCloth'"
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:612:
warning: ambiguous first argument; put parentheses or even spaces
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:832:
warning: ambiguous first argument; put parentheses or even spaces
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:1037:
warning: ambiguous first argument; put parentheses or even spaces
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:815:
warning: method redefined; discarding old inline_markdown_link
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:612:
warning: ambiguous first argument; put parentheses or even spaces
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:832:
warning: ambiguous first argument; put parentheses or even spaces
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:1037:
warning: ambiguous first argument; put parentheses or even spaces
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:169:
warning: already initialized constant VERSION
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:170:
warning: already initialized constant DEFAULT_RULES
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:242:
warning: method redefined; discarding old initialize
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:254:
warning: method redefined; discarding old to_html
/usr/local/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:311:
warning: already initialized constant TEXTILE_TAGS
-- (and so on) --
Krishna
···
On 8/19/05, Alexey Verkhovsky <alex@verk.info> wrote:
Gavin Kistner wrote:
> On Aug 18, 2005, at 11:29 PM, Jeff Wood wrote:
>
>> Reading your mail further, I tried the same using require_gem
>> 'RedCloth' and don't get all of those messages, why should that make
>> a difference?
>
>
> I'm guessing that you have redcloth installed both as a gem and as a
> library, and that it is being required from both locations, and the
> second require is redefining the constants. Guessing. Heavily.
>
Aha! I know, I know! Case-insensitive Windows file system strikes again,
and this time it bites RubyGems in the stern. Amusing
try require'redcloth' instead (note the lower case!), and see for yourself.
This is a RubyGems bug. To reproduce:
1. Take fresh Ruby install (must be on Windows)
2. Install RubyGems
3. Install RedCloth by gem install redcloth
4. Modify \ruby\lib\ruby\gems\1.8\gems\RedCloth3.0.3\redcloth.rb by
adding puts 'HERE' in the beginning.
5. ruby -w -e "require 'RedCloth'"
C:\>ruby -w -e "require 'RedCloth'"
HERE
HERE
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:612:
warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:832:
warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:1037:
warning: amiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/redcloth.rb:815:
warning: method redefined; discarding old inline_markdown_link
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:612:
warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:832:
warning: ambiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:1037:
warning: amiguous first argument; put parentheses or even spaces
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:169:
warning: already initialized constant VERSION
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:170:
warning: already initialized constant DEFAULT_RULES
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:242:
warning: metod redefined; discarding old initialize
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:254:
warning: metod redefined; discarding old to_html
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:311:
warning: already initialized constant TEXTILE_TAGS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:324:
warning: already initialized constant A_HLGN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:325:
warning: already initialized constant A_VLGN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:326:
warning: already initialized constant C_CLAS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:327:
warning: already initialized constant C_LNGE
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:328:
warning: already initialized constant C_STYL
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:329:
warning: already initialized constant S_CSPN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:330:
warning: already initialized constant S_RSPN
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:331:
warning: already initialized constant A
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:332:
warning: already initialized constant S
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:333:
warning: already initialized constant C
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:335:
warning: already initialized constant PUNCT
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:336:
warning: already initialized constant HYPERLINK
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:342:
warning: already initialized constant SIMPLE_HTML_TAGS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:364:
warning: already initialized constant GLYPHS
c:/ruby/lib/ruby/gems/1.8/gems/RedCloth-3.0.3/lib/RedCloth.rb:371:
warning: alre
this causes redcloth.rb to be loaded twice - first from ruby/lib/
FWIW, I had a similar experience with a lib, whose name I've forgotten
(don't you just love this precision), but the problem disappeared after
I removed an environment variable RUBYOPT (IIRC) which seemed to have
survived from an *earlier* ruby installation.
So you might check your environment and remove suspicious RUBY.... variables.
HTH
s.
···
On Fri, 19 Aug 2005 20:17:14 +0900, Krishna Dole <dontfall@gmail.com> wrote:
1. Take fresh Ruby install (must be on Windows)
2. Install RubyGems
3. Install RedCloth by gem install redcloth
4. Modify \ruby\lib\ruby\gems\1.8\gems\RedCloth3.0.3\redcloth.rb by
adding puts 'HERE' in the beginning.
5. ruby -w -e "require 'RedCloth'"
On Fri, 19 Aug 2005 20:17:14 +0900, Krishna Dole <dontfall@gmail.com> > wrote:
1. Take fresh Ruby install (must be on Windows)
2. Install RubyGems
3. Install RedCloth by gem install redcloth
4. Modify \ruby\lib\ruby\gems\1.8\gems\RedCloth3.0.3\redcloth.rb by
adding puts 'HERE' in the beginning.
5. ruby -w -e "require 'RedCloth'"
FWIW, I had a similar experience with a lib, whose name I've forgotten
(don't you just love this precision), but the problem disappeared after
I removed an environment variable RUBYOPT (IIRC) which seemed to have
survived from an *earlier* ruby installation.
So you might check your environment and remove suspicious RUBY.... variables.
HTH
s.
Or you might like to remove double entries in RUBYOPT. I had 'rubygems' twice mentioned in RUBYOPT.
BTW, that happened on a WinXP box running the one-click installer.