how to fix warnings i18n spree? - ruby-on-rails

rails g spree_i18n:install
trace :
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/spree_core-4.2.0.beta/lib/spree/i18n.rb:18: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/actionview-6.0.3.2/lib/action_view/helpers/translation_helper.rb:60: warning: The called method `translate' is defined here
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/friendly_id-globalize-1.0.0.alpha3/lib/friendly_id/history.rb:73: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/associations.rb:1370: warning: The called method `has_many' is defined here
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_nested_set-3.2.1/lib/awesome_nested_set/awesome_nested_set.rb:105: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/associations.rb:1657: warning: The called method `belongs_to' is defined here
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_nested_set-3.2.1/lib/awesome_nested_set/awesome_nested_set.rb:90: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/associations.rb:1370: warning: The called method `has_many' is defined here
run bundle exec rake db:migrate from "."
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/spree_core-4.2.0.beta/lib/spree/i18n.rb:18: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/actionview-6.0.3.2/lib/action_view/helpers/translation_helper.rb:60: warning: The called method `translate' is defined here
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/friendly_id-globalize-1.0.0.alpha3/lib/friendly_id/history.rb:73: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/associations.rb:1370: warning: The called method `has_many' is defined here
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_nested_set-3.2.1/lib/awesome_nested_set/awesome_nested_set.rb:105: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/associations.rb:1657: warning: The called method `belongs_to' is defined here
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/awesome_nested_set-3.2.1/lib/awesome_nested_set/awesome_nested_set.rb:90: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/ubuntu/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/activerecord-6.0.3.2/lib/active_record/associations.rb:1370: warning: The called method `has_many' is defined her
~/../i18.rb
def translate(*args)
#virtual_path = virtual_path
options = args.extract_options!
options[:scope] = [*options[:scope]].unshift(:spree)
args << options
super(*args) #line 18 WARNING
end
I tried to change it **args , but then i get
ArgumentError: wrong number of arguments (given 1, expected 0)
in this
only_integer: true, message: Spree.t('validation.must_be_int')
spree 4.2.0 beta
ruby 2.7.1

Please update to stable 4.2.0, this will fix those issues.
bundle update spree

Related

Running srb rbi hidden-definitions gives unclear error

Context
Our team recently upgrade to rails 6 (from 5.2). AFAIK, things were working pretty well up to that point.
We have a slightly unconventional file structure so we opted to use the :classic rails loader instead of :zeitwerk
Problem
Whenever we run srb rbi hidden-definitions now we get the following:
Got LoadError when trying to get nested name Tilt::PandocTemplate
Got LoadError when trying to get nested name Tilt::AsciidoctorTemplate
Got LoadError when trying to get nested name Tilt::CreoleTemplate
Got LoadError when trying to get nested name Tilt::LessTemplate
Got LoadError when trying to get nested name Tilt::LiquidTemplate
Got LoadError when trying to get nested name Tilt::LiveScriptTemplate
Got LoadError when trying to get nested name Tilt::MarkabyTemplate
Got LoadError when trying to get nested name Tilt::PrawnTemplate
Got LoadError when trying to get nested name Tilt::RadiusTemplate
Got LoadError when trying to get nested name Tilt::RedClothTemplate
Got LoadError when trying to get nested name Tilt::RstPandocTemplate
Got LoadError when trying to get nested name Tilt::TypeScriptTemplate
Got LoadError when trying to get nested name Tilt::WikiClothTemplate
Got LoadError when trying to get nested name Tilt::YajlTemplate
Naming WebConsoleGot NameError when trying to get nested name WebConsole::SourceLocation_
Generating /var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi with 20603 modules and 305 aliases
Printing your code's symbol table into /var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/from-source.json
Printing /var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi's symbol table into /var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.json
Traceback (most recent call last):
5: from /usr/local/var/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sorbet-0.5.5891/bin/srb-rbi:237:in `<main>'
4: from /usr/local/var/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sorbet-0.5.5891/bin/srb-rbi:224:in `main'
3: from /usr/local/var/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sorbet-0.5.5891/bin/srb-rbi:232:in `block in make_step'
2: from /usr/local/var/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sorbet-0.5.5891/lib/hidden-definition-finder.rb:38:in `main'
1: from /usr/local/var/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sorbet-0.5.5891/lib/hidden-definition-finder.rb:47:in `main'
/usr/local/var/rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/sorbet-0.5.5891/lib/hidden-definition-finder.rb:151:in `write_constants': /var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi had unexpected errors. Check this file for a clue: /var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.json.err (RuntimeError)
reflection.json.err (which the error points is to) is littered with countless errors that all look something like this:
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707623: dynamic constant assignment https://srb.help/2001
707623 | REFERENCE = ::T.let(nil, ::T.untyped)
^^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707624: dynamic constant assignment https://srb.help/2001
707624 | SETUTITSBUS = ::T.let(nil, ::T.untyped)
^^^^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707625: dynamic constant assignment https://srb.help/2001
707625 | SLAICEPS = ::T.let(nil, ::T.untyped)
^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707626: dynamic constant assignment https://srb.help/2001
707626 | SPECIALS = ::T.let(nil, ::T.untyped)
^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707627: dynamic constant assignment https://srb.help/2001
707627 | SUBSTITUTES = ::T.let(nil, ::T.untyped)
^^^^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707628: dynamic constant assignment https://srb.help/2001
707628 | VALID_CHAR = ::T.let(nil, ::T.untyped)
^^^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707629: dynamic constant assignment https://srb.help/2001
707629 | VALID_XML_CHARS = ::T.let(nil, ::T.untyped)
^^^^^^^^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707618: class definition in method body https://srb.help/2001
707618 |class REXML::Text < REXML::Child
^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707801: class definition in method body https://srb.help/2001
707801 |class REXML::UndefinedNamespaceException < REXML::ParseException
^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707813: module definition in method body https://srb.help/2001
707813 |module REXML::Validation
^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707817: class definition in method body https://srb.help/2001
707817 |class REXML::Validation::ValidationException < RuntimeError
^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707829: dynamic constant assignment https://srb.help/2001
707829 | DEFAULT_ENCODING = ::T.let(nil, ::T.untyped)
^^^^^^^^^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707830: dynamic constant assignment https://srb.help/2001
707830 | DEFAULT_STANDALONE = ::T.let(nil, ::T.untyped)
^^^^^^^^^^^^^^^^^^
/var/folders/w4/01z4c79j22l59fhcgyl43f8w0000gn/T/d20200911-19233-vy4tg3/reflection.rbi:707831: dynamic constant assignment https://srb.help/2001
707831 | DEFAULT_VERSION = ::T.let(nil, ::T.untyped)
^^^^^^^^^^^^^^^
Question
Any suggestions on how to move forward? One hunch is that we need to migrate to :zeitwerk to resolve this, but that's a pretty large refactor for us so I'm hesitant to explore that without confirming that that is a potential source for this failure.
EDIT: A variant of this patch has now been upstreamed into Sorbet and will be available in versions >= 0.5.5911. For anyone using those versions, this answer is no longer relevant.
I doubt that the error you are seeing is caused by any Rails configuration. The lines that you have posted from reflection.json.err do not show any real errors, either.
It looks like you are on Ruby 2.7, so I suspect that the error you are seeing is because of how the argument forwarding is done in 2.7 via def foo(...) method definitions. At runtime these turn into def foo(**, &&) in Ruby, and when Sorbet tries to generate the argument names, it fails, since * and & are not valid argument names.
You can try to patch the relevant method in sorbet gem using the diff I include below:
diff --git a/lib/serialize.rb b/lib/serialize.rb
index aec19ccb2..301793856 100644
--- a/lib/serialize.rb
+++ b/lib/serialize.rb
## -337,6 +337,14 ## class Sorbet::Private::Serialize
uniq += 1
end
end
+
+ # Sanitize parameter names that are not valid
+ name = name.to_s.gsub(/[^a-zA-Z0-9_]/) do
+ result = '_' + (uniq == 0 ? '' : uniq.to_s)
+ uniq += 1
+ result
+ end
+
[kind, name]
end
end
You can use bundle open sorbet to open the sorbet gem installed as part of your Gemfile in your editor, apply the diff above and re-run the hidden definitions generator. If that solves your problem, I'd be happy to PR it upstream to get it in the next sorbet release.

Unable to compile ejabberd in elixir application ubuntu

I'm using Ubuntu Erlang/OTP 19 [erts-8.1] Elixir (1.3.3) in a phoenix application.
Ejabberd version: 16.06
could not compile dependency :ejabberd
src/mod_ping.erl:32: Warning: behaviour gen_mod undefined src/ejabberd_access_permissions.erl:32: Warning: behaviour ejabberd_config undefined src/nodetree_tree_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/ejabberd.erl:109: Warning: random:seed/3: the 'random' module is deprecated; use the 'rand' module instead src/ejabberd.erl:143: Warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead src/http_p1.erl:156: Warning: type header() is unused src/http_p1.erl:166: Warning: type option() is unused src/mod_client_state.erl:31: Warning: behaviour gen_mod undefined src/ejabberd_auth_riak.erl: undefined parse transform 'ejabberd_sql_pt' src/ejabberd_auth_mnesia.erl: undefined parse transform 'ejabberd_sql_pt' src/ejabberd_ctl.erl:314: Warning: variable 'AccessCommands' is unused src/mod_mam_sql.erl: undefined parse transform 'ejabberd_sql_pt' include/mod_offline.hrl:3: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. include/mod_offline.hrl:4: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. include/mod_offline.hrl:3: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. include/mod_offline.hrl:4: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. src/mod_offline_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/mod_announce_sql.erl: undefined parse transform 'ejabberd_sql_pt' include/mod_offline.hrl:3: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. include/mod_offline.hrl:4: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. src/ejabberd_auth_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/ejabberd_oauth_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/ejabberd_service.erl:138: Warning: crypto:rand_bytes/1 is deprecated and will be removed in a future release; use crypto:strong_rand_bytes/1 src/ejabberd_service.erl:144: Warning: crypto:rand_bytes/1 is deprecated and will be removed in a future release; use crypto:strong_rand_bytes/1 src/mod_http_api.erl:506: Warning: function outofscope_response/0 is unused src/mod_roster_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/sql_queries.erl: undefined parse transform 'ejabberd_sql_pt' src/mod_vcard_xupdate_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/mod_echo.erl:175: Warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead src/mod_shared_roster_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/ejabberd_xmlrpc.erl:219: Warning: variable 'CommOpts' is unused src/mod_muc_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/node_flat_sql.erl: undefined parse transform 'ejabberd_sql_pt' src/extauth.erl:105: Warning: random:seed/1: the 'random' module is deprecated; use the 'rand' module instead src/extauth.erl:106: Warning: random:uniform/1: the 'random' module is deprecated; use the 'rand' module instead src/ejabberd_s2s_out.erl:1102: Warning: random:seed/1: the 'random' module is deprecated; use the 'rand' module instead src/ejabberd_s2s_out.erl:1108: Warning: random:uniform/0: the 'random' module is deprecated; use the 'rand' module instead include/mod_offline.hrl:3: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. include/mod_offline.hrl:4: Warning: erlang:now/0: Deprecated BIF. See the "Time and Time Correction in Erlang" chapter of the ERTS User's Guide for more information. src/cyrsasl_scram.erl:90: Warning: crypto:rand_bytes/1 is deprecated and will be removed in a future release; use crypto:strong_rand_bytes/1 src/cyrsasl_scram.erl:104: Warning: crypto:rand_bytes/1 is deprecated and will be removed in a future release; use crypto:strong_rand_bytes/1
However, I'm able to run it without any problems on OSX Erlang/OTP 19 [erts-8.0.2] Elixir (1.3.2).
ejabberd 16.06 is not compliant with Erlang OTP R19. You should use ejabberd 16.09.

Obtain a full list of valid system_info atoms

I've guessed a couple of the erlang:system_info/1 variants such as:
10> erlang:system_info(schedulers).
4
11> erlang:system_info(cpu).
** exception error: bad argument
in function erlang:system_info/1
called as erlang:system_info(cpu)
12> erlang:system_info(cpu_arch).
** exception error: bad argument
in function erlang:system_info/1
called as erlang:system_info(cpu_arch)
13> erlang:system_info(memory).
** exception error: bad argument
in function erlang:system_info/1
called as erlang:system_info(memory)
14> erlang:system_info(version).
"5.10.4"
But is there a way, either via introspection, or a global database of some sort, to list all the available system_info arguments ?
Refer to the documentation for erlang:system_info/1. It's listed over several sections with descriptions for what each atom represents. This is the most comprehensive list of supported atoms outside of the Erlang/OTP source itself (and there are a few undocumented parameters).
There is no language feature which would allow you to list all of the possible atoms.

Eclipse Open CV Application building error?

I am going to build my Open CV project(C++) in Eclipse, but it gives an error in makefile, the error is
recipe for target `Open_CV.exe' failed
i have also included the lib and opencv in project successfuly, but i don't know why i am getting this error, sometimes i am also getting an error in its subdir file
and Error log is :
Build of configuration Debug for project Open_CV **
make all
Building file: ../src/Open_CV.c
Invoking: Cross GCC Compiler
gcc -I"C:\OpenCV2.0\include\opencv" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/Open_CV.d" -MT"src/Open_CV.d" -o"src/Open_CV.o" "../src/Open_CV.c"
In file included from C:/OpenCV2.0/include/opencv/cv.h:1612,
from ../src/Open_CV.c:8:
C:/OpenCV2.0/include/opencv/cvcompat.h: In function cvMinAreaRect':
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: left-hand operand of comma expression has no effect
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: left-hand operand of comma expression has no effect
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: left-hand operand of comma expression has no effect
C:/OpenCV2.0/include/opencv/cvcompat.h:425: warning: statement with no effect
../src/Open_CV.c: In functionmain':
../src/Open_CV.c:20: warning: implicit declaration of function `printf'
../src/Open_CV.c: At top level:
C:/OpenCV2.0/include/opencv/cxtypes.h:249: warning: 'cvFloor' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:267: warning: 'cvCeil' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:287: warning: 'cvIsNaN' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:302: warning: 'cvIsInf' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:321: warning: 'cvRNG' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:337: warning: 'cvRandReal' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:670: warning: 'cvmGet' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:705: warning: 'cvIplDepth' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:880: warning: 'cvRectToROI' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:893: warning: 'cvROIToRect' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:914: warning: 'cvTermCriteria' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:936: warning: 'cvPoint' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:966: warning: 'cvPointTo32f' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:991: warning: 'cvPoint3D32f' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:1011: warning: 'cvPoint2D64f' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:1031: warning: 'cvPoint3D64f' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:1052: warning: 'cvSize' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:1070: warning: 'cvSize2D32f' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:1146: warning: 'cvRealScalar' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:1154: warning: 'cvScalarAll' defined but not used
C:/OpenCV2.0/include/opencv/cxtypes.h:1666: warning: 'cvAttrList' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:153: warning: 'cvDecRefData' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:174: warning: 'cvIncRefData' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:208: warning: 'cvGetRow' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:219: warning: 'cvGetCol' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:248: warning: 'cvReleaseMatND' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:271: warning: 'cvGetNextSparseNode' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:522: warning: 'cvSubS' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1083: warning: 'cvCloneSeq' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1126: warning: 'cvSetNew' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1141: warning: 'cvSetRemoveByPtr' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1156: warning: 'cvGetSetElem' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1323: warning: 'cvEllipseBox' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1414: warning: 'cvFont' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1672: warning: 'cvReadIntByName' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1687: warning: 'cvReadRealByName' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1701: warning: 'cvReadStringByName' defined but not used
C:/OpenCV2.0/include/opencv/cxcore.h:1713: warning: 'cvReadByName' defined but not used
C:/OpenCV2.0/include/opencv/cxmisc.h:222: warning: 'cvAlignPtr' defined but not used
C:/OpenCV2.0/include/opencv/cxmisc.h:228: warning: 'cvAlign' defined but not used
C:/OpenCV2.0/include/opencv/cxmisc.h:234: warning: 'cvGetMatSize' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:635: warning: 'cvCreateSubdivDelaunay2D' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:670: warning: 'cvSubdiv2DNextEdge' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:676: warning: 'cvSubdiv2DRotateEdge' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:681: warning: 'cvSubdiv2DSymEdge' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:686: warning: 'cvSubdiv2DGetEdge' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:694: warning: 'cvSubdiv2DEdgeOrg' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:701: warning: 'cvSubdiv2DEdgeDst' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:708: warning: 'cvTriangleArea' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:892: warning: 'cvCalcHist' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:1136: warning: 'cvSURFPoint' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:1207: warning: 'cvStarKeypoint' defined but not used
C:/OpenCV2.0/include/opencv/cv.h:1231: warning: 'cvStarDetectorParams' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:112: warning: 'cvMatArray' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:127: warning: 'cvMean' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:134: warning: 'cvSumPixels' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:141: warning: 'cvMean_StdDev' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:154: warning: 'cvmPerspectiveProject' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:165: warning: 'cvFillImage' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:216: warning: 'cvRandInit' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:249: warning: 'cvbRand' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:257: warning: 'cvbCartToPolar' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:273: warning: 'cvbFastArctan' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:286: warning: 'cvbSqrt' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:296: warning: 'cvbInvSqrt' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:306: warning: 'cvbReciprocal' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:316: warning: 'cvbFastExp' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:324: warning: 'cvbFastLog' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:332: warning: 'cvContourBoundingRect' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:338: warning: 'cvPseudoInverse' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:385: warning: 'cvConvexHull' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:413: warning: 'cvMinAreaRect' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:434: warning: 'cvFitLine3D' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:444: warning: 'cvFitLine2D' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:453: warning: 'cvFitEllipse' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:464: warning: 'cvProject3D' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:506: warning: 'cvHoughLines' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:519: warning: 'cvHoughLinesP' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:531: warning: 'cvHoughLinesSDiv' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:543: warning: 'cvFindFundamentalMatrix' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:577: warning: 'cvFindChessBoardCornerGuesses' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:588: warning: 'cvCalibrateCamera' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:613: warning: 'cvCalibrateCamera_64d' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:642: warning: 'cvFindExtrinsicCameraParams' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:667: warning: 'cvFindExtrinsicCameraParams_64d' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:693: warning: 'cvRodrigues' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:711: warning: 'cvProjectPoints' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:740: warning: 'cvProjectPointsSimple' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:771: warning: 'cvUnDistortInit' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:786: warning: 'cvUnDistort' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:804: warning: 'cvCalcEMD' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:815: warning: 'cvKMeans' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:829: warning: 'cvStartScanGraph' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:842: warning: 'cvEndScanGraph' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:862: warning: 'cvLineAA' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:868: warning: 'cvCircleAA' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:876: warning: 'cvEllipseAA' defined but not used
C:/OpenCV2.0/include/opencv/cvcompat.h:883: warning: 'cvPolyLineAA' defined but not used
Finished building: ../src/Open_CV.c
Building target: Open_CV.exe
Invoking: Cross GCC Linker
gcc -L"C:\OpenCV2.0\lib" -o"Open_CV.exe" ./src/Open_CV.o -lcv200 -lhighgui200
./src/Open_CV.o: In function cvDecRefData':
C:/OpenCV2.0/include/opencv/cxcore.h:159: undefined reference tocvFree'
C:/OpenCV2.0/include/opencv/cxcore.h:167: undefined reference to _cvFree_'
./src/Open_CV.o: In functioncvGetRow':
C:/OpenCV2.0/include/opencv/cxcore.h:209: undefined reference to _cvGetRows'
./src/Open_CV.o: In functioncvGetCol':
C:/OpenCV2.0/include/opencv/cxcore.h:220: undefined reference to _cvGetCols'
./src/Open_CV.o: In functioncvReleaseMatND':
C:/OpenCV2.0/include/opencv/cxcore.h:249: undefined reference to _cvReleaseMat'
./src/Open_CV.o: In functioncvSubS':
C:/OpenCV2.0/include/opencv/cxcore.h:523: undefined reference to _cvAddS'
./src/Open_CV.o: In functioncvCloneSeq':
C:/OpenCV2.0/include/opencv/cxcore.h:1084: undefined reference to _cvSeqSlice'
./src/Open_CV.o: In functioncvSetNew':
C:/OpenCV2.0/include/opencv/cxcore.h:1135: undefined reference to _cvSetAdd'
./src/Open_CV.o: In functioncvGetSetElem':
C:/OpenCV2.0/include/opencv/cxcore.h:1157: undefined reference to _cvGetSeqElem'
./src/Open_CV.o: In functioncvEllipseBox':
C:/OpenCV2.0/include/opencv/cxcore.h:1328: undefined reference to _cvEllipse'
./src/Open_CV.o: In functioncvFont':
C:/OpenCV2.0/include/opencv/cxcore.h:1416: undefined reference to _cvInitFont'
./src/Open_CV.o: In functioncvReadIntByName':
C:/OpenCV2.0/include/opencv/cxcore.h:1673: undefined reference to _cvGetFileNodeByName'
./src/Open_CV.o: In functioncvReadRealByName':
C:/OpenCV2.0/include/opencv/cxcore.h:1688: undefined reference to _cvGetFileNodeByName'
./src/Open_CV.o: In functioncvReadStringByName':
C:/OpenCV2.0/include/opencv/cxcore.h:1702: undefined reference to _cvGetFileNodeByName'
./src/Open_CV.o: In functioncvReadByName':
C:/OpenCV2.0/include/opencv/cxcore.h:1714: undefined reference to _cvGetFileNodeByName'
C:/OpenCV2.0/include/opencv/cxcore.h:1714: undefined reference to_cvRead'
./src/Open_CV.o: In function cvMean':
C:/OpenCV2.0/include/opencv/cvcompat.h:128: undefined reference to_cvAvg'
./src/Open_CV.o: In function cvSumPixels':
C:/OpenCV2.0/include/opencv/cvcompat.h:135: undefined reference to_cvSum'
./src/Open_CV.o: In function cvMean_StdDev':
C:/OpenCV2.0/include/opencv/cvcompat.h:143: undefined reference to_cvAvgSdv'
./src/Open_CV.o: In function cvmPerspectiveProject':
C:/OpenCV2.0/include/opencv/cvcompat.h:157: undefined reference to_cvReshape'
C:/OpenCV2.0/include/opencv/cvcompat.h:158: undefined reference to _cvReshape'
C:/OpenCV2.0/include/opencv/cvcompat.h:160: undefined reference to_cvPerspectiveTransform'
./src/Open_CV.o: In function cvFillImage':
C:/OpenCV2.0/include/opencv/cvcompat.h:166: undefined reference to_cvGetElemType'
C:/OpenCV2.0/include/opencv/cvcompat.h:166: undefined reference to _cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:166: undefined reference to_cvSet'
./src/Open_CV.o: In function cvRandSetRange':
C:/OpenCV2.0/include/opencv/cvcompat.h:188: undefined reference to_cvError'
C:/OpenCV2.0/include/opencv/cvcompat.h:194: undefined reference to _cvError'
./src/Open_CV.o: In functioncvRandInit':
C:/OpenCV2.0/include/opencv/cvcompat.h:219: undefined reference to _cvError'
C:/OpenCV2.0/include/opencv/cvcompat.h:225: undefined reference to_cvError'
./src/Open_CV.o: In function cvRand':
C:/OpenCV2.0/include/opencv/cvcompat.h:240: undefined reference to_cvError'
C:/OpenCV2.0/include/opencv/cvcompat.h:243: undefined reference to _cvRandArr'
./src/Open_CV.o: In functioncvbCartToPolar':
C:/OpenCV2.0/include/opencv/cvcompat.h:267: undefined reference to _cvCartToPolar'
./src/Open_CV.o: In functioncvbFastArctan':
C:/OpenCV2.0/include/opencv/cvcompat.h:281: undefined reference to _cvCartToPolar'
./src/Open_CV.o: In functioncvbSqrt':
C:/OpenCV2.0/include/opencv/cvcompat.h:291: undefined reference to _cvPow'
./src/Open_CV.o: In functioncvbInvSqrt':
C:/OpenCV2.0/include/opencv/cvcompat.h:301: undefined reference to _cvPow'
./src/Open_CV.o: In functioncvbReciprocal':
C:/OpenCV2.0/include/opencv/cvcompat.h:311: undefined reference to _cvPow'
./src/Open_CV.o: In functioncvbFastExp':
C:/OpenCV2.0/include/opencv/cvcompat.h:319: undefined reference to _cvExp'
./src/Open_CV.o: In functioncvbFastLog':
C:/OpenCV2.0/include/opencv/cvcompat.h:327: undefined reference to _cvLog'
./src/Open_CV.o: In functioncvPseudoInverse':
C:/OpenCV2.0/include/opencv/cvcompat.h:339: undefined reference to _cvInvert'
./src/Open_CV.o: In functioncvProject3D':
C:/OpenCV2.0/include/opencv/cvcompat.h:473: undefined reference to _cvTransform'
./src/Open_CV.o: In functioncvFindFundamentalMatrix':
C:/OpenCV2.0/include/opencv/cvcompat.h:549: undefined reference to _cvCreateMat'
C:/OpenCV2.0/include/opencv/cvcompat.h:550: undefined reference to_cvCreateMat'
C:/OpenCV2.0/include/opencv/cvcompat.h:566: undefined reference to _cvReleaseMat'
C:/OpenCV2.0/include/opencv/cvcompat.h:567: undefined reference to_cvReleaseMat'
./src/Open_CV.o: In function cvUnDistortInit':
C:/OpenCV2.0/include/opencv/cvcompat.h:774: undefined reference to_cvGetRawData'
./src/Open_CV.o: In function cvUnDistort':
C:/OpenCV2.0/include/opencv/cvcompat.h:790: undefined reference to_cvGetRawData'
./src/Open_CV.o: In function cvKMeans':
C:/OpenCV2.0/include/opencv/cvcompat.h:816: undefined reference to_cvCreateMat'
C:/OpenCV2.0/include/opencv/cvcompat.h:821: undefined reference to _cvKMeans2'
C:/OpenCV2.0/include/opencv/cvcompat.h:822: undefined reference to_cvReleaseMat'
./src/Open_CV.o: In function cvStartScanGraph':
C:/OpenCV2.0/include/opencv/cvcompat.h:833: undefined reference to_cvError'
C:/OpenCV2.0/include/opencv/cvcompat.h:835: undefined reference to _cvCreateGraphScanner'
C:/OpenCV2.0/include/opencv/cvcompat.h:837: undefined reference tocvFree'
./src/Open_CV.o: In function cvEndScanGraph':
C:/OpenCV2.0/include/opencv/cvcompat.h:844: undefined reference to_cvError'
C:/OpenCV2.0/include/opencv/cvcompat.h:848: undefined reference to _cvAlloc'
C:/OpenCV2.0/include/opencv/cvcompat.h:850: undefined reference to_cvReleaseGraphScanner'
./src/Open_CV.o: In function cvLineAA':
C:/OpenCV2.0/include/opencv/cvcompat.h:863: undefined reference to_cvGetElemType'
C:/OpenCV2.0/include/opencv/cvcompat.h:863: undefined reference to _cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:863: undefined reference to_cvLine'
./src/Open_CV.o: In function cvCircleAA':
C:/OpenCV2.0/include/opencv/cvcompat.h:869: undefined reference to_cvGetElemType'
C:/OpenCV2.0/include/opencv/cvcompat.h:869: undefined reference to _cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:869: undefined reference to_cvCircle'
./src/Open_CV.o: In function cvEllipseAA':
C:/OpenCV2.0/include/opencv/cvcompat.h:877: undefined reference to_cvGetElemType'
C:/OpenCV2.0/include/opencv/cvcompat.h:877: undefined reference to _cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:877: undefined reference to_cvEllipse'
makefile:30: recipe for target Open_CV.exe' failed
./src/Open_CV.o: In functioncvPolyLineAA':
C:/OpenCV2.0/include/opencv/cvcompat.h:884: undefined reference to _cvGetElemType'
C:/OpenCV2.0/include/opencv/cvcompat.h:884: undefined reference to_cvColorToScalar'
C:/OpenCV2.0/include/opencv/cvcompat.h:884: undefined reference to `_cvPolyLine'
collect2: ld returned 1 exit status
make: * [Open_CV.exe] Error 1
I think you missed to link the libcxcore "-lcxcore" (or maybe "-lcvaux").

RMagick warning while running server

I am using gem 1.3.7, rails 2.3.5 and ruby 1.8.7 (2008-08-11 patchlevel 72). While starting server i get below warnings.
Loading development environment (Rails 2.3.5)
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:44: warning: already initialized constant PercentGeometry
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:45: warning: already initialized constant AspectGeometry
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:46: warning: already initialized constant LessGeometry
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:47: warning: already initialized constant GreaterGeometry
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:48: warning: already initialized constant AreaGeometry
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:49: warning: already initialized constant MinimumGeometry
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:52: warning: already initialized constant FLAGS
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:58: warning: already initialized constant RFLAGS
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:92: warning: already initialized constant W
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:93: warning: already initialized constant H
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:94: warning: already initialized constant X
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:95: warning: already initialized constant Y
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:96: warning: already initialized constant RE
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:151: warning: already initialized constant ALIGN_TYPE_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:156: warning: already initialized constant ANCHOR_TYPE_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:162: warning: already initialized constant DECORATION_TYPE_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:169: warning: already initialized constant FONT_WEIGHT_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:180: warning: already initialized constant GRAVITY_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:187: warning: already initialized constant PAINT_METHOD_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:199: warning: already initialized constant STRETCH_TYPE_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:205: warning: already initialized constant STYLE_TYPE_NAMES
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:673: warning: already initialized constant Model_Version
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:674: warning: already initialized constant Destination
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:675: warning: already initialized constant File_Format
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:676: warning: already initialized constant File_Format_Version
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:677: warning: already initialized constant Service_Identifier
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:678: warning: already initialized constant Envelope_Number
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:679: warning: already initialized constant Product_ID
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:680: warning: already initialized constant Envelope_Priority
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:681: warning: already initialized constant Date_Sent
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:682: warning: already initialized constant Time_Sent
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:683: warning: already initialized constant Coded_Character_Set
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:684: warning: already initialized constant UNO
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:685: warning: already initialized constant Unique_Name_of_Object
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:686: warning: already initialized constant ARM_Identifier
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:687: warning: already initialized constant ARM_Version
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:691: warning: already initialized constant Record_Version
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:692: warning: already initialized constant Object_Type_Reference
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:693: warning: already initialized constant Object_Name
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:694: warning: already initialized constant Title
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:695: warning: already initialized constant Edit_Status
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:696: warning: already initialized constant Editorial_Update
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:697: warning: already initialized constant Urgency
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:698: warning: already initialized constant Subject_Reference
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:699: warning: already initialized constant Category
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:700: warning: already initialized constant Supplemental_Category
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:701: warning: already initialized constant Fixture_Identifier
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:702: warning: already initialized constant Keywords
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:703: warning: already initialized constant Content_Location_Code
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:704: warning: already initialized constant Content_Location_Name
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:705: warning: already initialized constant Release_Date
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:706: warning: already initialized constant Release_Time
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:707: warning: already initialized constant Expiration_Date
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:708: warning: already initialized constant Expiration_Time
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:709: warning: already initialized constant Special_Instructions
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:710: warning: already initialized constant Action_Advised
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:711: warning: already initialized constant Reference_Service
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:712: warning: already initialized constant Reference_Date
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:713: warning: already initialized constant Reference_Number
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:714: warning: already initialized constant Date_Created
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:715: warning: already initialized constant Time_Created
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:716: warning: already initialized constant Digital_Creation_Date
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:717: warning: already initialized constant Digital_Creation_Time
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:718: warning: already initialized constant Originating_Program
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:719: warning: already initialized constant Program_Version
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:720: warning: already initialized constant Object_Cycle
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:721: warning: already initialized constant By_Line
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:722: warning: already initialized constant Author
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:723: warning: already initialized constant By_Line_Title
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:724: warning: already initialized constant Author_Position
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:725: warning: already initialized constant City
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:726: warning: already initialized constant Sub_Location
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:727: warning: already initialized constant Province
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:728: warning: already initialized constant State
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:729: warning: already initialized constant Country_Primary_Location_Code
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:730: warning: already initialized constant Country_Primary_Location_Name
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:731: warning: already initialized constant Original_Transmission_Reference
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:732: warning: already initialized constant Headline
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:733: warning: already initialized constant Credit
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:734: warning: already initialized constant Source
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:735: warning: already initialized constant Copyright_Notice
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:736: warning: already initialized constant Contact
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:737: warning: already initialized constant Abstract
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:738: warning: already initialized constant Caption
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:739: warning: already initialized constant Editor
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:740: warning: already initialized constant Caption_Writer
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:741: warning: already initialized constant Rasterized_Caption
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:742: warning: already initialized constant Image_Type
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:743: warning: already initialized constant Image_Orientation
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:744: warning: already initialized constant Language_Identifier
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:745: warning: already initialized constant Audio_Type
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:746: warning: already initialized constant Audio_Sampling_Rate
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:747: warning: already initialized constant Audio_Sampling_Resolution
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:748: warning: already initialized constant Audio_Duration
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:749: warning: already initialized constant Audio_Outcue
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:750: warning: already initialized constant ObjectData_Preview_File_Format
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:751: warning: already initialized constant ObjectData_Preview_File_Format_Version
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:752: warning: already initialized constant ObjectData_Preview_Data
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:756: warning: already initialized constant Size_Mode
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:757: warning: already initialized constant Max_Subfile_Size
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:758: warning: already initialized constant ObjectData_Size_Announced
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:759: warning: already initialized constant Maximum_ObjectData_Size
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:763: warning: already initialized constant Subfile
/Users/me/.rvm/gems/ruby-1.8.7-p72#mbm/gems/rmagick-2.13.1/lib/RMagick.rb:767: warning: already initialized constant Confirmed_ObjectData_Size
gem 'rmagick', :require => false
I don't know whether it is a solution or not but it worked for me after removing gem "rmagick" from environment.rb file without breaking anything. This might because of gem already installed in system.

Resources