<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>I On Rails</title>
	<atom:link href="http://ionrails.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://ionrails.com</link>
	<description>Keeping an &#039;I&#039; on RoR</description>
	<lastBuildDate>Wed, 16 May 2012 21:57:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to resolve the rmagick.rb:248: [BUG] Segmentation fault issue</title>
		<link>http://ionrails.com/2012/05/16/how-to-resolve-the-rmagick-rb248-bug-segmentation-fault-issue/</link>
		<comments>http://ionrails.com/2012/05/16/how-to-resolve-the-rmagick-rb248-bug-segmentation-fault-issue/#comments</comments>
		<pubDate>Wed, 16 May 2012 21:54:49 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[BUG]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[rmagick.rb]]></category>
		<category><![CDATA[Segmentation fault]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=761</guid>
		<description><![CDATA[The way I resolved the following rmagick.rb:248: [BUG] Segmentation fault issue was by reinstalling the ImageMagick and the rmagick gem. When reinstalling imagemagick, you should disable openmp. See below. Source: http://stackoverflow.com/questions/7319445/rmagick-leads-to-server-shutdown:]]></description>
			<content:encoded><![CDATA[<p>The way I resolved the following rmagick.rb:248: [BUG] Segmentation fault issue was by reinstalling the ImageMagick and the rmagick gem. When reinstalling imagemagick, you should disable openmp. See below. Source: http://stackoverflow.com/questions/7319445/rmagick-leads-to-server-shutdown:</p>
<pre class="brush: ruby; title: ; notranslate">
brew uninstall imagemagick &amp;&amp; brew install -f imagemagick --disable-openmp &amp;&amp; gem uninstall rmagick &amp;&amp; gem install rmagick
</pre>
<pre class="brush: ruby; title: ; notranslate">
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/processing/rmagick.rb:248: [BUG] Segmentation fault
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-darwin11.0.0]

-- Control frame information -----------------------------------------------
c:0128 p:---- s:0613 b:0613 l:000612 d:000612 CFUNC  :read
c:0127 p:0054 s:0609 b:0609 l:000608 d:000608 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/processing/rmagick.rb:248
c:0126 p:0011 s:0599 b:0599 l:0003c8 d:0003c8 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/processing/rmagick.rb:132
c:0125 p:0092 s:0594 b:0594 l:000583 d:000593 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/processing.rb:85
c:0124 p:---- s:0589 b:0589 l:000588 d:000588 FINISH
c:0123 p:---- s:0587 b:0587 l:000586 d:000586 CFUNC  :each
c:0122 p:0037 s:0584 b:0584 l:000583 d:000583 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/processing.rb:81
c:0121 p:0015 s:0580 b:0580 l:000571 d:000579 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/callbacks.rb:18
c:0120 p:---- s:0577 b:0577 l:000576 d:000576 FINISH
c:0119 p:---- s:0575 b:0575 l:000574 d:000574 CFUNC  :each
c:0118 p:0059 s:0572 b:0572 l:000571 d:000571 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/callbacks.rb:18
c:0117 p:0091 s:0567 b:0567 l:000566 d:000566 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/cache.rb:112
c:0116 p:0283 s:0563 b:0563 l:000552 d:000562 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/versions.rb:231
c:0115 p:---- s:0558 b:0558 l:000557 d:000557 FINISH
c:0114 p:---- s:0556 b:0556 l:000555 d:000555 CFUNC  :each
c:0113 p:0055 s:0553 b:0553 l:000552 d:000552 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/versions.rb:216
c:0112 p:0015 s:0548 b:0548 l:000539 d:000547 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/callbacks.rb:18
c:0111 p:---- s:0545 b:0545 l:000544 d:000544 FINISH
c:0110 p:---- s:0543 b:0543 l:000542 d:000542 CFUNC  :each
c:0109 p:0059 s:0540 b:0540 l:000539 d:000539 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/callbacks.rb:18
c:0108 p:0091 s:0535 b:0535 l:000534 d:000534 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/uploader/cache.rb:112
c:0107 p:0019 s:0531 b:0531 l:000530 d:000530 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/mount.rb:315
c:0106 p:0021 s:0526 b:0526 l:000525 d:000525 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/mount.rb:173
c:0105 p:0054 s:0522 b:0522 l:000521 d:000521 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/carrierwave-0.6.2/lib/carrierwave/orm/activerecord.rb:37
c:0104 p:0106 s:0517 b:0517 l:000507 d:000516 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/attribute_assignment.rb:85
c:0103 p:---- s:0513 b:0513 l:000512 d:000512 FINISH
c:0102 p:---- s:0511 b:0511 l:000510 d:000510 CFUNC  :each
c:0101 p:0089 s:0508 b:0508 l:000507 d:000507 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/attribute_assignment.rb:78
c:0100 p:0015 s:0500 b:0500 l:002568 d:000499 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/persistence.rb:212
c:0099 p:0015 s:0498 b:0498 l:002360 d:000497 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/transactions.rb:295
c:0098 p:0232 s:0496 b:0496 l:000495 d:000495 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/database_s
c:0097 p:0025 s:0487 b:0487 l:000486 d:000486 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/transactions.rb:208
c:0096 p:0022 s:0482 b:0482 l:002360 d:002360 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/transactions.rb:293
c:0095 p:0015 s:0478 b:0478 l:002568 d:002568 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/persistence.rb:211
c:0094 p:0068 s:0473 b:0473 l:000472 d:000472 METHOD /Users/navid/Development/my_rails_app/app/controllers/profiles_controller.rb:28
c:0093 p:0014 s:0469 b:0469 l:000468 d:000468 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/implicit_render.rb:4
c:0092 p:0015 s:0463 b:0463 l:000462 d:000462 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:167
c:0091 p:0041 s:0458 b:0458 l:000457 d:000457 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/rendering.rb:10
c:0090 p:0010 s:0454 b:0454 l:0014d0 d:000453 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:18
c:0089 p:0404 s:0452 b:0452 l:000451 d:000451 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:480
c:0088 p:0115 s:0446 b:0446 l:000445 d:000445 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405
c:0087 p:0027 s:0437 b:0437 l:000436 d:000436 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385
c:0086 p:0024 s:0432 b:0432 l:000431 d:000431 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81
c:0085 p:0020 s:0426 b:0426 l:0014d0 d:0014d0 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/abstract_controller/callbacks.rb:17
c:0084 p:0012 s:0422 b:0422 l:000421 d:000421 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/rescue.rb:29
c:0083 p:0010 s:0417 b:0417 l:000398 d:000416 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:30
c:0082 p:0017 s:0413 b:0413 l:000403 d:000412 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123
c:0081 p:0032 s:0411 b:0411 l:000410 d:000410 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/notifications/instrumenter.rb:20
c:0080 p:0036 s:0404 b:0404 l:000403 d:000403 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/notifications.rb:123
c:0079 p:0152 s:0399 b:0399 l:000398 d:000398 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/instrumentation.rb:29
c:0078 p:0143 s:0394 b:0394 l:000393 d:000393 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/params_wrapper.rb:205
c:0077 p:0032 s:0388 b:0388 l:000387 d:000387 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/railties/controller_runtime.rb:18
c:0076 p:0093 s:0383 b:0383 l:000382 d:000382 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:121
c:0075 p:0084 s:0377 b:0377 l:000376 d:000376 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:45
c:0074 p:0048 s:0372 b:0372 l:000371 d:000371 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal.rb:203
c:0073 p:0086 s:0367 b:0367 l:000366 d:000366 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/rack_delegation.rb:14
c:0072 p:0030 s:0361 b:0361 l:001cb8 d:000360 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal.rb:246
c:0071 p:---- s:0358 b:0358 l:000357 d:000357 FINISH
c:0070 p:---- s:0356 b:0356 l:000355 d:000355 CFUNC  :call
c:0069 p:0022 s:0352 b:0352 l:000351 d:000351 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73
c:0068 p:0094 s:0346 b:0346 l:000345 d:000345 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:36
c:0067 p:0161 s:0340 b:0340 l:000323 d:000339 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/journey-1.0.3/lib/journey/router.rb:68
c:0066 p:---- s:0329 b:0329 l:000328 d:000328 FINISH
c:0065 p:---- s:0327 b:0327 l:000326 d:000326 CFUNC  :each
c:0064 p:0051 s:0324 b:0324 l:000323 d:000323 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/journey-1.0.3/lib/journey/router.rb:56
c:0063 p:0025 s:0320 b:0320 l:000319 d:000319 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:600
c:0062 p:0017 s:0316 b:0316 l:000315 d:000315 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/airbrake-3.0.9/lib/airbrake/rack.rb:27
c:0061 p:0014 s:0309 b:0309 l:000300 d:000308 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/warden-1.1.0/lib/warden/manager.rb:35
c:0060 p:---- s:0307 b:0307 l:000306 d:000306 FINISH
c:0059 p:---- s:0305 b:0305 l:000304 d:000304 CFUNC  :catch
c:0058 p:0086 s:0301 b:0301 l:000300 d:000300 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/warden-1.1.0/lib/warden/manager.rb:34
c:0057 p:0015 s:0296 b:0296 l:000295 d:000295 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17
c:0056 p:0015 s:0289 b:0289 l:000288 d:000288 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/etag.rb:23
c:0055 p:0052 s:0281 b:0281 l:000280 d:000280 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/conditionalget.rb:35
c:0054 p:0093 s:0274 b:0274 l:000273 d:000273 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14
c:0053 p:0046 s:0267 b:0267 l:000266 d:000266 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/params_parser.rb:21
c:0052 p:0054 s:0262 b:0262 l:000261 d:000261 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/flash.rb:242
c:0051 p:0031 s:0254 b:0254 l:000253 d:000253 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205
c:0050 p:0013 s:0246 b:0246 l:000245 d:000245 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200
c:0049 p:0020 s:0242 b:0242 l:000241 d:000241 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/cookies.rb:338
c:0048 p:0064 s:0234 b:0234 l:000233 d:000233 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/query_cache.rb:64
c:0047 p:0029 s:0225 b:0225 l:000224 d:000224 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection
c:0046 p:0014 s:0217 b:0217 l:000d10 d:000216 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:28
c:0045 p:0040 s:0215 b:0215 l:000214 d:000214 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405
c:0044 p:0115 s:0208 b:0208 l:000207 d:000207 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405
c:0043 p:0027 s:0199 b:0199 l:000198 d:000198 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385
c:0042 p:0024 s:0194 b:0194 l:000193 d:000193 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81
c:0041 p:0013 s:0188 b:0188 l:000d10 d:000d10 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:27
c:0040 p:0044 s:0184 b:0184 l:000183 d:000183 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/remote_ip.rb:31
c:0039 p:0017 s:0180 b:0180 l:000179 d:000179 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:16
c:0038 p:0017 s:0173 b:0173 l:000172 d:000172 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/show_exceptions.rb:56
c:0037 p:0045 s:0167 b:0167 l:000166 d:000166 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/cucumber-rails-1.2.1/lib/cucumber/rails/action_controller.rb:10
c:0036 p:0121 s:0163 b:0163 l:000162 d:000162 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/rack/logger.rb:26
c:0035 p:0052 s:0157 b:0157 l:000156 d:000156 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/rack/logger.rb:16
c:0034 p:0048 s:0153 b:0153 l:000152 d:000152 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/request_id.rb:22
c:0033 p:0095 s:0146 b:0146 l:000145 d:000145 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/methodoverride.rb:21
c:0032 p:0032 s:0141 b:0141 l:000140 d:000140 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/runtime.rb:17
c:0031 p:0057 s:0132 b:0132 l:000131 d:000131 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/cache/strategy/local_cache.rb:72
c:0030 p:0068 s:0128 b:0128 l:000127 d:000127 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/lock.rb:15
c:0029 p:0124 s:0122 b:0122 l:000121 d:000121 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/static.rb:62
c:0028 p:0015 s:0116 b:0116 l:000115 d:000115 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/airbrake-3.0.9/lib/airbrake/user_informer.rb:12
c:0027 p:0032 s:0107 b:0107 l:000106 d:000106 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/engine.rb:479
c:0026 p:0034 s:0103 b:0103 l:000102 d:000102 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/application.rb:220
c:0025 p:0019 s:0099 b:0099 l:000098 d:000098 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/builder.rb:134
c:0024 p:0201 s:0095 b:0095 l:000081 d:000094 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/urlmap.rb:64
c:0023 p:---- s:0087 b:0087 l:000086 d:000086 FINISH
c:0022 p:---- s:0085 b:0085 l:000084 d:000084 CFUNC  :each
c:0021 p:0063 s:0082 b:0082 l:000081 d:000081 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/urlmap.rb:49
c:0020 p:0056 s:0073 b:0073 l:000072 d:000072 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara/server.rb:17
c:0019 p:0020 s:0069 b:0069 l:000060 d:000068 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:80
c:0018 p:---- s:0067 b:0067 l:000066 d:000066 FINISH
c:0017 p:---- s:0065 b:0065 l:000064 d:000064 CFUNC  :catch
c:0016 p:0135 s:0061 b:0061 l:000060 d:000060 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:78
c:0015 p:0088 s:0056 b:0055 l:000054 d:000054 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:53
c:0014 p:0036 s:0052 b:0052 l:000051 d:000051 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:38
c:0013 p:---- s:0047 b:0047 l:000046 d:000046 FINISH
c:0012 p:---- s:0045 b:0045 l:000044 d:000044 CFUNC  :run_machine
c:0011 p:0248 s:0042 b:0042 l:000041 d:000041 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/eventmachine-0.12.10/lib/eventmachine.rb:256
c:0010 p:0066 s:0035 b:0035 l:002070 d:002070 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/backends/base.rb:61
c:0009 p:0143 s:0031 b:0031 l:000030 d:000030 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/server.rb:159
c:0008 p:0081 s:0028 b:0028 l:000027 d:000027 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/handler/thin.rb:13
c:0007 p:0063 s:0022 b:0022 l:000021 d:000021 METHOD /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara.rb:177
c:0006 p:0021 s:0017 b:0017 l:0020f8 d:000016 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara.rb:236
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC  :call
c:0003 p:0040 s:0006 b:0006 l:001638 d:000005 BLOCK  /Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara/server.rb:65
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:---- s:0002 b:0002 l:000001 d:000001 TOP   

-- Ruby level backtrace information ----------------------------------------
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara/server.rb:65:in `block in boot'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara/server.rb:65:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara.rb:236:in `block (2 levels) in &lt;top (required)&gt;'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara.rb:177:in `run_default_server'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/handler/thin.rb:13:in `run'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/eventmachine-0.12.10/lib/eventmachine.rb:256:in `run_machine'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/capybara-1.1.2/lib/capybara/server.rb:17:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/urlmap.rb:49:in `each'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/urlmap.rb:64:in `block in call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/builder.rb:134:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/application.rb:220:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/engine.rb:479:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/airbrake-3.0.9/lib/airbrake/user_informer.rb:12:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/static.rb:62:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/lock.rb:15:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/runtime.rb:17:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/methodoverride.rb:21:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/rack/logger.rb:16:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/railties-3.2.3/lib/rails/rack/logger.rb:26:in `call_app'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/cucumber-rails-1.2.1/lib/cucumber/rails/action_controller.rb:10:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:81:in `run_callbacks'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `__run_callback'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activesupport-3.2.3/lib/active_support/callbacks.rb:405:in `_run__3325432370046815384__call__4124604685534991187__callbacks'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/connection_adapters/abstract/connection_pool.rb:467:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/query_cache.rb:64:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/cookies.rb:338:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:200:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/session/abstract/id.rb:205:in `context'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/flash.rb:242:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/head.rb:14:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/conditionalget.rb:35:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/rack-1.4.1/lib/rack/etag.rb:23:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/warden-1.1.0/lib/warden/manager.rb:34:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/warden-1.1.0/lib/warden/manager.rb:34:in `catch'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/warden-1.1.0/lib/warden/manager.rb:35:in `block in call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/airbrake-3.0.9/lib/airbrake/rack.rb:27:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:600:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/journey-1.0.3/lib/journey/router.rb:56:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/journey-1.0.3/lib/journey/router.rb:56:in `each'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/journey-1.0.3/lib/journey/router.rb:68:in `block in call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:36:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_dispatch/routing/route_set.rb:73:in `call'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal.rb:246:in `block in action'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/action_controller/metal.rb:203:in `dispatch'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/abstract_controller/rendering.rb:45:in `process'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/actionpack-3.2.3/lib/abstract_controller/base.rb:121:in `process'
/Users/navid/.rvm/gems/ruby-1.9.3-p194@my_rails_app/gems/activerecord-3.2.3/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2012/05/16/how-to-resolve-the-rmagick-rb248-bug-segmentation-fault-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ckeditor $ is not defined</title>
		<link>http://ionrails.com/2012/05/15/ckeditor-is-not-defined/</link>
		<comments>http://ionrails.com/2012/05/15/ckeditor-is-not-defined/#comments</comments>
		<pubDate>Tue, 15 May 2012 20:13:47 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=756</guid>
		<description><![CDATA[ckeditor gem assumes that you load your JavaScripts at the top of your page instead of the bottom. I used the SimpleForm integration by setting the textarea input field parameter to :as => :ckeditor which inserts the following code beneath your textarea: However, if you load your JavaScript at the bottom of the page instead [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://github.com/galetahub/ckeditor" title="ckeditor gem">ckeditor gem</a> assumes that you load your JavaScripts at the top of your page instead of the bottom.</p>
<p>I used the SimpleForm integration by setting the textarea input field parameter to :as => :ckeditor which inserts the following code beneath your textarea:</p>
<pre class="brush: jscript; title: ; notranslate">
//&lt;![CDATA[
$(document).ready(function(){ if (CKEDITOR.instances['paper_abstract']) {CKEDITOR.remove(CKEDITOR.instances['unique_id_of_your_textarea_goes_here']);}CKEDITOR.replace('unique_id_of_your_textarea_goes_here', {&quot;language&quot;:&quot;en&quot;,&quot;rows&quot;:10,&quot;toolbar&quot;:&quot;Full&quot;,&quot;class&quot;:[&quot;ckeditor&quot;,&quot;required&quot;],&quot;required&quot;:true,&quot;placeholder&quot;:&quot;Please enter an abstract.&quot;}); });
//]]&gt;
</pre>
<p>However, if you load your JavaScript at the bottom of the page instead of the top, you&#8217;ll see this error in your Firebug Console: &#8216;$ is not defined&#8217;</p>
<p>My current solution was to not use the :as => :ckeditor parameter but instead call the above JavaScript code from within a js that gets loaded at the top of the page.</p>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2012/05/15/ckeditor-is-not-defined/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Share and Like Button Customization Issues</title>
		<link>http://ionrails.com/2012/05/04/facebook-share-like-button/</link>
		<comments>http://ionrails.com/2012/05/04/facebook-share-like-button/#comments</comments>
		<pubDate>Fri, 04 May 2012 07:13:59 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Views]]></category>
		<category><![CDATA[customizing]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[facebook like]]></category>
		<category><![CDATA[facebook share]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=730</guid>
		<description><![CDATA[My goal was to get a customized Facebook Like button working. Our designer gave us a mockup of a Facebook button which didn&#8217;t have the word Like in it, no counter or anything else except the f in a rounded-corner box Facebook logo. It was very difficult to customize it since code you insert into [...]]]></description>
			<content:encoded><![CDATA[<p>My goal was to get a customized Facebook Like button working. Our designer gave us a mockup of a Facebook button which didn&#8217;t have the word Like in it, no counter or anything else except the f in a rounded-corner box Facebook logo. It was very difficult to customize it since code you insert into your HTML DOM is an iframe and Facebook does all it can to prevent you from changing the style of their code, in order to replace their background image. Because Facebook Like button options didn&#8217;t match my needs, I resorted to using the Facebook Share button. The Facebook Like button information can be found here <a href="http://developers.facebook.com/docs/reference/plugins/like/" title="Facebook Like Button" target="_blank">Facebook Like Button</a>.</p>
<p>The Facebook Share button is deprecated but still works, though Facebook no longer supports it. Information on that can be found at <a href="http://developers.facebook.com/docs/share/" title="Facebook Share Button" target="_blank">Facebook Share Button</a>. I used the fb_share type of &#8216;icon&#8217; which is the type of icon I was interested.</p>
<p>Has anyone solved the problem of customizing the Facebook Like icon, without a counter and without displaying anything else but a simple 18&#215;18 pixel Facebook icon? I tried to modify the background image within Facebook&#8217;s iframe via css and JavaScript with no luck. I wasn&#8217;t even able to do this with the Firebug console.</p>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2012/05/04/facebook-share-like-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>String datatype usages</title>
		<link>http://ionrails.com/2012/05/04/string-datatype-usages/</link>
		<comments>http://ionrails.com/2012/05/04/string-datatype-usages/#comments</comments>
		<pubDate>Fri, 04 May 2012 06:59:24 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[data type]]></category>
		<category><![CDATA[String]]></category>
		<category><![CDATA[usage]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=725</guid>
		<description><![CDATA[&#8216; &#8216; &#8221; &#8221; %q( ) &#8211; matches with single-quote but you can choose %Q&#124; &#124; &#8211; like double-quote but you can choose end chars doc =]]></description>
			<content:encoded><![CDATA[<p>&#8216; &#8216;<br />
&#8221; &#8221;<br />
%q( ) &#8211; matches with single-quote but you can choose<br />
%Q| | &#8211; like double-quote but you can choose end chars</p>
<p>doc = <<END # you can choose any keyword END in this case&#8230; not sure about escaping rules<br />
&#8230;<br />
&#8230;<br />
END</p>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2012/05/04/string-datatype-usages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 3 Performance</title>
		<link>http://ionrails.com/2011/05/15/rails-3-performance/</link>
		<comments>http://ionrails.com/2011/05/15/rails-3-performance/#comments</comments>
		<pubDate>Sun, 15 May 2011 17:15:34 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[performance]]></category>
		<category><![CDATA[rails 3 performance]]></category>
		<category><![CDATA[rails performance]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=718</guid>
		<description><![CDATA[Great article on Rails 3 performance Rails 3 Performance &#8211; Not Good Enough]]></description>
			<content:encoded><![CDATA[<p>Great article on Rails 3 performance <a href="http://blog.tstmedia.com/news_article/show/86942?referrer_id=308069">Rails 3 Performance &#8211; Not Good Enough</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2011/05/15/rails-3-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails and rake db:migrate in Production Mode</title>
		<link>http://ionrails.com/2011/05/07/rails-rake-db-migrate-in-production-mode/</link>
		<comments>http://ionrails.com/2011/05/07/rails-rake-db-migrate-in-production-mode/#comments</comments>
		<pubDate>Sat, 07 May 2011 21:01:53 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[production]]></category>
		<category><![CDATA[production mode]]></category>
		<category><![CDATA[rails c]]></category>
		<category><![CDATA[rails console]]></category>
		<category><![CDATA[rails s]]></category>
		<category><![CDATA[rails server]]></category>
		<category><![CDATA[rake db:migrate]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=713</guid>
		<description><![CDATA[There are some inconsistencies when running rails server, rails console and rake db:migrate in production mode. There really should be a standard way to let the rails and rake commands know you want to execute them in production mode. Starting Rails Server in Production Mode Starting Rails Console in Production Mode rake db:migrate in Production [...]]]></description>
			<content:encoded><![CDATA[<p>There are some inconsistencies when running rails server, rails console and rake db:migrate in production mode. There really should be a standard way to let the rails and rake commands know you want to execute them in production mode.</p>
<h3>Starting Rails Server in Production Mode</h3>
<pre class="brush: ruby; title: ; notranslate">
rails server -e production
OR
rails s -e production
</pre>
<h3>Starting Rails Console in Production Mode</h3>
<pre class="brush: ruby; title: ; notranslate">
rails console production
OR
rails c production
</pre>
<h3>rake db:migrate in Production Mode</h3>
<pre class="brush: ruby; title: ; notranslate">
rake db:migrate RAILS_ENV=production
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2011/05/07/rails-rake-db-migrate-in-production-mode/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing All Rails Log Files with Rake Task</title>
		<link>http://ionrails.com/2011/04/26/clearing-all-rails-log-files-with-rake-task/</link>
		<comments>http://ionrails.com/2011/04/26/clearing-all-rails-log-files-with-rake-task/#comments</comments>
		<pubDate>Tue, 26 Apr 2011 18:12:37 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[log files]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rake]]></category>
		<category><![CDATA[rake log:clear]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=706</guid>
		<description><![CDATA[In order to clear all of your Rails log files development.log, production.log, server.log and test.log with a rake task, type: This is mainly useful while under development. Be careful with this as it will clear out your production.log file as well!]]></description>
			<content:encoded><![CDATA[<p>In order to clear <strong>all</strong> of your Rails log files development.log, production.log, server.log and test.log with a rake task, type:</p>
<pre class="brush: ruby; title: ; notranslate">
rake log:clear
</pre>
<p>This is mainly useful while under development. Be careful with this as it will clear out your production.log file as well!</p>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2011/04/26/clearing-all-rails-log-files-with-rake-task/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building Custom XML Responses in Rails</title>
		<link>http://ionrails.com/2011/04/16/building-xml-response-in-rails/</link>
		<comments>http://ionrails.com/2011/04/16/building-xml-response-in-rails/#comments</comments>
		<pubDate>Sat, 16 Apr 2011 08:09:11 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[AJAX]]></category>
		<category><![CDATA[routes]]></category>
		<category><![CDATA[building custom xml]]></category>
		<category><![CDATA[building xml]]></category>
		<category><![CDATA[custom xml]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails 3]]></category>
		<category><![CDATA[response xml]]></category>
		<category><![CDATA[xml]]></category>
		<category><![CDATA[xml builder]]></category>
		<category><![CDATA[xml response]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=699</guid>
		<description><![CDATA[Assume you have a CitiesController with just one action capital_city, which doesn&#8217;t need any of the RESTful actions. I set up a custom route for this one action. The capital_city action returns the xml like the following, for example: Here is what the entry in the routes.rb file looks like: Your controller may look something [...]]]></description>
			<content:encoded><![CDATA[<p>Assume you have a CitiesController with just one action capital_city, which doesn&#8217;t need any of the RESTful actions. I set up a custom route for this one action. </p>
<p>The capital_city action returns the xml like the following, for example:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;list&gt;
  &lt;item&gt;Washington D.C.&lt;/item&gt;
&lt;/list&gt;
</pre>
<p>Here is what the entry in the routes.rb file looks like:</p>
<pre class="brush: ruby; title: ; notranslate">
  get &quot;cities/capital_city&quot;
</pre>
<p>Your controller may look something like below, where call to City.capital_city is just a named scope defined in your model which takes a country name as an argument and returns the name of the capital city.</p>
<pre class="brush: ruby; title: ; notranslate">
class CitiesController &lt; ApplicationController

  # GET /cities/capital_city.xml?country=United States
  def capital_city
    @capital_city = City.capital_city(params[:country])

    respond_to do |format|
      format.xml # COMMENT THIS OUT TO USE YOUR CUSTOM XML RESPONSE INSTEAD  { render :xml =&gt; @capital_city }
    end
  end
end
</pre>
<p>Therefore, you need to create a xml builder file in place where you would normally expect the builder file to be, which is the view.<br />
So, in this case, you would expect the builder file to be under views/cities/capital_city.xml.builder</p>
<p>Your views/cities/capital_city.xml.builder would contain:</p>
<pre class="brush: ruby; title: ; notranslate">
xml.instruct!
xml.list do
  if @capital_city.empty?
    xml.item
  else
    xml.item @capital_city[0]['name']
  end
end
</pre>
<p>Then you should be able to hit http://localhost:3000cities/capital_city.xml?country=United States and see the xml response.</p>
<p>I recommend switching the HTTP method from &#8216;get&#8217; to &#8216;post&#8217; instead in the routes file, if for example, you are using the xml response for an AJAX request. However, for testing purposes it&#8217;s easier to use the get method first if you want to test it in your browser without special tools.</p>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2011/04/16/building-xml-response-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bundle Install &#8211; missing mysql.h</title>
		<link>http://ionrails.com/2011/04/13/bundle-install-missing-mysql-h/</link>
		<comments>http://ionrails.com/2011/04/13/bundle-install-missing-mysql-h/#comments</comments>
		<pubDate>Wed, 13 Apr 2011 17:57:51 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[Installing]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[bundle install]]></category>
		<category><![CDATA[gem install]]></category>
		<category><![CDATA[installing mysql gem]]></category>
		<category><![CDATA[mamp]]></category>
		<category><![CDATA[missing]]></category>
		<category><![CDATA[mysql.h]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=695</guid>
		<description><![CDATA[If you&#8217;re seeing the following error: The way I was able to resolve it was to follow Boonedocks.net, since I&#8217;m also using MAMP for its MySQL Database instance. The only difference is that I already had MAMP 1.9.4 installed and so I had to download the MAMP_components_1.9.dmg which contains the mysql-5.1.44 source code. MAMP 1.9.4 [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re seeing the following error:</p>
<pre class="brush: ruby; title: ; notranslate">
checking for rb_thread_blocking_region()... yes
checking for mysql.h... no
checking for mysql/mysql.h... no
-----
mysql.h is missing.  please check your installation of mysql and try again.
</pre>
<p>The way I was able to resolve it was to follow <a href="http://boonedocks.net/mike/archives/175-MAMP-and-the-Ruby-MySQL-Gem.html">Boonedocks.net</a>, since I&#8217;m also using MAMP for its MySQL Database instance.</p>
<p>The only difference is that I already had MAMP 1.9.4 installed and so I had to download the MAMP_components_1.9.dmg which contains the mysql-5.1.44 source code. MAMP 1.9.4 comes with mysql-5.1.44 but I needed the source code so I can compile libraries so the mysql Gem can link against it.</p>
<p>Here are the steps, assuming you already have MAMP or a separate standalone MySQL instance installed. </p>
<p>However, you should be able to follow similar instructions even if you don&#8217;t have MAMP installed. If you don&#8217;t have MAMP installed, correct the paths referenced below, as these ones below reference the MAMP directory.</p>
<ol>
<li>Figure out which version of mysql you have installed by running mysql from the prompt or checking your phpinfo page</li>
<li>Download and Install the MAMP_components_1.x.dmg or the MySQL source code. The version should match your current mysql version though in order to avoid issues. Inside the MAMP Components, you should see a mysql tarball. You need to untar/unzip that.</li>
<li>cd into the mysql-5.x source directory</li>
<li>Assuming you have MAMP installed, type the following: ./configure &#8211;with-unix-socket-path=/Applications/MAMP/tmp/mysql/mysql.sock &#8211;without-server &#8211;prefix=/Applications/MAMP/Library</li>
<li>Execute: make -j2</li>
<li>Execute: cp libmysql/.libs/*.dylib /Applications/MAMP/Library/lib/mysql</li>
<li>Execute: mkdir /Applications/MAMP/Library/include</li>
<li>Execute: cp -R include /Applications/MAMP/Library/include/mysql</li>
<li>Execute: sudo env ARCHFLAGS=&#8221;-arch i386&#8243; gem install mysql &#8212; &#8211;with-mysql-config=/Applications/MAMP/Library/bin/mysql_config</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2011/04/13/bundle-install-missing-mysql-h/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Using lambda with named scopes in Rails 3</title>
		<link>http://ionrails.com/2011/04/12/using-lambda-with-named-scopes-in-rails-3/</link>
		<comments>http://ionrails.com/2011/04/12/using-lambda-with-named-scopes-in-rails-3/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 23:54:29 +0000</pubDate>
		<dc:creator>navid</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[models]]></category>
		<category><![CDATA[activerecord]]></category>
		<category><![CDATA[activerelation]]></category>
		<category><![CDATA[lambda]]></category>
		<category><![CDATA[named scopes]]></category>
		<category><![CDATA[scopes]]></category>

		<guid isPermaLink="false">http://ionrails.com/?p=690</guid>
		<description><![CDATA[You can define an ActiveRelation named scope inside your model Address, for example, like so:]]></description>
			<content:encoded><![CDATA[<p>You can define an ActiveRelation named scope inside your model Address, for example, like so:</p>
<pre class="brush: ruby; title: ; notranslate">
class Address &lt; ActiveRecord::Base
  scope :search, lambda {|query| where([&quot;name LIKE ?&quot;, &quot;%#{query}%&quot;])}
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://ionrails.com/2011/04/12/using-lambda-with-named-scopes-in-rails-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

