RMagick on Ruby 1.9.1 (i386-mingw32) Work !!! :D [UPDATE]

RMagick on Ruby 1.9.1 (i386-mingw32) Work !!! ๐Ÿ˜€
Ispirate from :
installing rmagick with mingw and ruby 1.9
and
http://groups.google.com/group/rubyinstaller/browse_thread/thread/c837c4438d91208b
but , on my laptop don’t work….

With Windows 7 work well:

Step 1: DOWNLOAD

1) Ruby => http://rubyforge.org/frs/download.php/74298/rubyinstaller-1.9.2-p180.exe
2) DevKit => http://github.com/downloads/oneclick/rubyinstaller/DevKit-tdm-32-4.5.1-20101214-1400-sfx.exe
3) ImageMagick => http://www.imagemagick.org/download/binaries/ImageMagick-6.6.7-9-Q16-windows-dll.exe
4) RMagick => https://github.com/rmagick/rmagick/zipball/master
5) type-windows.xml => http://www.imagemagick.org/source/type-windows.xml

Step 2: Install

1) Ruby => c:Ruby192
2) DevKit => c:DevKit
3) ImageMagick => c:ImageMagick-6.6.7-Q16 [WITH HEADER !!!!!!!]
3.a) Replace c:ImageMagick-6.6.7-Q16configtype-ghostscript.xml  with type-windows.xml
4) RMagick => c:rmagick-rmagick

Step 3: Set Enviroment variable

1) PATH = C:Ruby192bin;C:ImageMagick-6.6.7-Q16
2) CPATH = C:ImageMagick-6.6.7-Q16include
3) LIBRARY_PATH = C:ImageMagick-6.6.7-Q16lib

Step 4: Configure DevKit
(from https://github.com/oneclick/rubyinstaller/wiki/Development-Kit)

1) cd c:DevKit
2) ruby dk.rb init
3) ruby dk.rb install
4) C:DevKitdevkitvars.bat (THANKS TO Joachim  => http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/#comment-86618621)

Step 5: Compile RMagick

1) run C:DevKitmsys.bat
2) cd /c/rmagick-rmagick
3) ruby setup.rb
4) ruby setup.rb install

Step 6: Check

1) ruby -v
        ruby 1.9.2p180 (2011-02-18) [i386-mingw32]
2) identify --version
    Version: ImageMagick 6.6.7-9 2011-02-21 Q16 http://www.imagemagick.org
	Copyright: Copyright (C) 1999-2011 ImageMagick Studio LLC
	Features: OpenMP

If you experience problems concerning “extconf.rb”, you should try:
http://phosphor-escence.blogspot.com/2010/12/if-you-fail-install-rmagick-on-mingw.html
from
http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/#comment-166014708
http://www.waydotnet.com/blog/2010/02/rmagick-on-ruby-1-9-1-i386-mingw32-work-d/#comment-317551623


In my case :
1) Install Ruby 1.9.1 (i386-mingw32) from http://www.rubyinstaller.org/, direct link

2) Install Development Kit (DevKit) from http://www.rubyinstaller.org/addons.html, direct link

3) Install ImageMagick 6.5.6-8-Q8 from http://www.imagemagick.org , direct link with header !!!!

4) Download Rmagick from source : http://github.com/rmagick/rmagick , direct link or git clone git://github.com/rmagick/rmagick.git

5) Replace !ImageMagick Path!configtype-ghostscript.xml with

http://www.imagemagick.org/source/type-windows.xml

 

 

6) Set enviroment variable :
set CPATH=!ImageMagick Path!include
set LIBRARY_PATH=!ImageMagick Path!lib
set PATH=!ImageMagick Path!
[EDIT]
set PATH = !ruby_path!bin
set PATH = !ruby_path!devkitmsys1.0.11bin
set PATH = !ruby_path!devkitgcc3.4.5bin
[EDIT]
7) run “ruby setup.rb” [EDIT] from msys.bat ( !ruby_path!devkitmsys1.0.11msys.bat ) [EDIT]

 

8) run “ruby setup.rb install” or “gem build *.gemspec” and “gem install *.gem”

9) Enjoy ๐Ÿ˜€

identify –version
Version: ImageMagick 6.5.6-8 2009-10-03 Q8 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC

 

ruby -v
ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

Many thanks to :
Rmagick staff => http://rmagick.rubyforge.org/
rogerdpack => http://betterlogic.com
Alexey Borzenkov => not have link, sorry
Luis Lavena => http://blog.mmediasys.com
RubyInstaller => http://www.rubyinstaller.org
RubyInstaller Group => http://groups.google.com/group/rubyinstaller
puts WaYdotNET => Carlo Bertini

Photo Resize from console :D

Qui raccolgo un po di script che mi sono fatto x la vita di tutti i giorni ๐Ÿ˜€

Photo resize (photo_resize)

piccolo script in ruby che serve per fare delle thumbnails di foto, passando almeno la cartella contenente le foto (strano :D)

Require:

ruby (test with: ruby 1.9.1p378 (2010-01-10 revision 26273) [x86_64-linux] ||ruby 1.8.7 (2009-12-24 patchlevel 248) [x86_64-linux] || jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM) 64-Bit Server VM 1.6.0_15) [amd64-java] )
rmagick (http://rmagick.rubyforge.org/)
optiflag (http://optiflag.rubyforge.org/)

syntax:

----------------                                      
    Description:        Folder with image to resize   
           Flag:        -s (Required, takes 1 argument) 
      Long Form:        --source                        
Alternate Flags:        -source, -S, -from              
----------------
    Description:        Folder to save the thumbnails, auto => source/thumb
           Flag:        -t (Optional, takes 1 argument)
      Long Form:        --target
Alternate Flags:        -target, -T, -to, -To
----------------
    Description:        Width max
           Flag:        -pw (Optional, takes 1 argument)
      Long Form:        --photo_width
Alternate Flags:        -width
----------------
    Description:        Height max
           Flag:        -ph (Optional, takes 1 argument)
      Long Form:        --photo_height
Alternate Flags:        -height
----------------
    Description:        Filter type: ex. jpg,JPG , default => jpg,JPG
           Flag:        -pt (Optional, takes 1 argument)
      Long Form:        --photo_type
Alternate Flags:        -type
----------------
    Description:        Help
           Flag:        -h (Optional, takes 0 arguments)
      Long Form:        --help
Alternate Flags:        -help, -?, -?
----------------
    Description:        Extended Help
           Flag:        -superhelp (Optional, takes 0 arguments)
      Long Form:        --superhelp

Tutti i miei script li trovate qui:
http://www.waydotnet.com/blog/scripts/

Ubuntu 9.10 , run level 3 => installare driver Nvidia

Se dovete installare i nuovi driver Nvidia NVIDIA-Linux-x86_64-190.53-pkg2.run su ubuntu 9.10, dovete aver killato il server X …
Girovagando su internet ho trovato un modo veloce, che non conoscevo [visto che sono praticamente nuovo su linux], per poterlo fare

Tramite alt+ctrl+f1 entriamo in tty1 (conosole senza X)
ed immettiamo :

sudo /etc/init.d/gdm stop

poi potete installare tranuquillamente i driver Nvidia su vostro Ubuntu ๐Ÿ˜€

[SOLVED] log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ‘:’, expecting keyword_then or ‘;’ or ‘n’

EDIT: SOLVED , vedere commento ๐Ÿ˜€

log4r 1.1.4 & ruby 1.9.1 => GDC.rb and NDC.rb syntax error, unexpected ‘:’, expecting keyword_then or ‘;’ or ‘n’

GDC.rb

--- GDC.rb	Thu Jan 28 17:03:12 2010

+++ GDC.rb.new	Thu Jan 28 16:50:37 2010

@@ -13,10 +13,10 @@

     private_class_method :new

 

     def self.check_thread_instance()

-      if ( Thread.main != Thread.current ):

+      if ( Thread.main != Thread.current )

 	raise "Can only initialize Global Diagnostic Context from Thread.main" 

       else

-	if ( Thread.main[GDCNAME] == nil ):

+	if ( Thread.main[GDCNAME] == nil )

 	  Thread.main[GDCNAME] = $0

 	end

       end

line 19
repalce
if ( Thread.main[GDCNAME] == nil ):
with
if ( Thread.main[GDCNAME] == nil )

NDC.rb

--- NDC.rb	Thu Jan 28 17:03:09 2010

+++ NDC.rb.new	Thu Jan 28 16:51:35 2010

@@ -15,7 +15,7 @@

     private_class_method :new

 

     def self.check_thread_instance()

-      if ( Thread.current[NDCNAME] == nil ):

+      if ( Thread.current[NDCNAME] == nil )

 	Thread.current[NDCNAME] = Array.new

 	Thread.current[NDCNAMEMAXDEPTH] = NDCDEFAULTMAXDEPTH

       end

@@ -65,7 +65,7 @@

 

     def self.push( value )

       self.check_thread_instance()

-      if ( Thread.current[NDCNAME].length < Thread.current[NDCNAMEMAXDEPTH] ):		

+      if ( Thread.current[NDCNAME].length < Thread.current[NDCNAMEMAXDEPTH] )

 	Thread.current[NDCNAME].push( value )

       end

     end

[SOLVED] ruby 1.9.1 mingw32 wxruby => undefined reference to ‘wxGraphicsRenderer::CreateBitmap’

Hi to all,
i’ve compiled wxWidgets with this options:

./configure --enable-optimise --enable-stl --enable-unicode
--disable-threads --enable-static  --with-opengl --disable-shared
--enable-monolithic --disable-debug --with-libjpeg=builtin
--with-libpng=builtin  --with-zlib=builtin --enable-graphics_ctx
--enable-mediactrl --enable-unicode --with-libtiff=builtin
--with-expat=builtin --enable-gui -enable-xrc --enable-mdi --enable-gif
--enable-pcx --enable-iff --enable-png --enable-xpm

and also compiled StyledTextCtrl .

My system is :
Windows xp sp3
ruby 1.9.1p243 (2009-07-16 revision 24175) [i386-mingw32]
gcc.exe 3.4.5
swig.exe 1.3.38
rake 0.8.7

when compiled wxruby (from svn), i’ve recived this error:

c:msysMinGWbin..libgccmingw323.4.5........mingw32binld.exe:
warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
C:msys1.0srcwxWidgets-2.8.10/lib/libwx_mswu-2.8.a(monolib_graphcmn.o):graphcmn.cpp:(.text+0x3374):
undefined reference to `wxGraphicsRenderer::CreateBitmap(wxBitmapconst&)'
collect2: ld returned 1 exit status
rake aborted!
Command failed with status (1): [g++ -shared -L.obj/AboutDialogInfo.o o...]

[SOLVED]

IF i compile wxWidgests 2.8.10 i’ve this error:

C:msys1.0srcwxWidgets-2.8.10/lib/libwx_mswu-2.8.a(monolib_graphcmn.o):graphcmn.cpp:(.text+0x3374): 
undefined reference to `wxGraphicsRenderer::CreateBitmap(wxBitmap 
const&)'

If i compile with wxWidgets 2.8.9 WORK !!!

this is the gem :
svn version: 2107
http://www.waydotnet.com/ruby/wxruby-ruby19-2.0.1.svn-x86-mingw32.gem

Only problem when install without –no-rdoc

๐Ÿ˜€

reference:
http://www.ruby-forum.com/topic/202491

64bit:

./configure --enable-optimise --enable-stl --enable-unicode --enable-threads --enable-static  --with-opengl --disable-shared --enable-monolithic --disable-debug --with-libjpeg=builtin --with-libpng=builtin  --with-zlib=builtin --enable-graphics_ctx --enable-mediactrl --enable-unicode --with-libtiff=builtin --with-expat=builtin --enable-gui -enable-xrc --enable-mdi --enable-gif --enable-pcx --enable-iff --enable-png --enable-xpm --with-odbc=sys CFLAGS=-fPIC CXXFLAGS=-fPIC LDFLAGS=-fPIC

Mono Tools for Visual Studio

Mono Tools for Visual Studio is a commercial add-in for Microsoft™ Visual Studio™ that enables developers to write .NET applications for non-Windows platforms within their preferred development environment. It allows developers to build, debug and deploy .NET applications on Linux, while continuing to leverage the extensive ecosystem of code, libraries, and tools available for .NET.

fonte:
http://go-mono.com/monovs/Default.aspx