<?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>IDIFY Solutions LLP &#187; Ruby</title>
	<atom:link href="http://blog.idifysolutions.com/category/open-source/ruby-on-rails/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.idifysolutions.com</link>
	<description>I Do It For You</description>
	<lastBuildDate>Wed, 13 Mar 2013 14:59:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>ERROR: rvm requires autoreconf to install the selected ruby interpreter however autoreconf was not found in the PATH.</title>
		<link>http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/</link>
		<comments>http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 04:34:16 +0000</pubDate>
		<dc:creator>pardeep</dc:creator>
				<category><![CDATA[Installation]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=141</guid>
		<description><![CDATA[This problem generally occurs in 1.8.7-head In ubuntu this can solve your problem. &#160; apt-get install automake Share on Facebook]]></description>
			<content:encoded><![CDATA[<p>This problem generally occurs in 1.8.7-head</p>
<p>In ubuntu this can solve your problem.</p>
<p>&nbsp;</p>
<p>apt-get install automake</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/11/error-rvm-requires-autoreconf-to-install-the-selected-ruby-interpreter-however-autoreconf-was-not-found-in-the-path/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Convert utf-8 to chinese in ruby on rails</title>
		<link>http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/</link>
		<comments>http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/#comments</comments>
		<pubDate>Wed, 14 Sep 2011 12:21:21 +0000</pubDate>
		<dc:creator>Deepak</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=106</guid>
		<description><![CDATA[Sample code to send a utf-8 string in subject line of email. Its pretty simple and straight forward &#160; def send_to_lead(lead_email, from_email, from_name, offer_id, club_id, customer_id) @customer_name = from_name @customer_email = from_email str = &#8220;&#38;#26399;&#38;#24453;&#38;#24456;&#38;#24555;&#38;#23601;&#38;#21487;!&#8221; #    str= &#8220;subject in english&#8221; subject=str if str[0..1]==&#8221;&#38;#&#8221; subject_raw = str.gsub(&#8220;&#38;#&#8221;,&#8221;").gsub(&#8220;!&#8221;,&#8221;").split(&#8220;;&#8221;) subject=&#8221;" subject_raw.each {&#124;t&#124; subject += [t.to_i].pack(&#8220;U*&#8221;)} end mail(:to =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Sample code to send a utf-8 string in subject line of email. Its pretty simple and straight forward</p>
<blockquote><p>&nbsp;</p>
<p>def send_to_lead(lead_email, from_email, from_name, offer_id, club_id, customer_id)<br />
@customer_name = from_name<br />
@customer_email = from_email<br />
str = &#8220;&amp;#26399;&amp;#24453;&amp;#24456;&amp;#24555;&amp;#23601;&amp;#21487;!&#8221;<br />
#    str= &#8220;subject in english&#8221;<br />
subject=str<br />
if str[0..1]==&#8221;&amp;#&#8221;<br />
subject_raw = str.gsub(&#8220;&amp;#&#8221;,&#8221;").gsub(&#8220;!&#8221;,&#8221;").split(&#8220;;&#8221;)<br />
subject=&#8221;"<br />
subject_raw.each {|t| subject += [t.to_i].pack(&#8220;U*&#8221;)}<br />
end<br />
mail(:to =&gt; lead_email,<br />
:from =&gt; &#8220;\&#8221;"+from_name+&#8221;\&#8221;" + &#8220;&lt;&#8221;+from_email+&#8221;&gt;&#8221;,<br />
:charset =&gt; &#8216;utf-8&#8242;,<br />
:subject =&gt; subject,<br />
:reply_to =&gt; &#8216;noreply@buddyreferralsystem.com&#8217;,<br />
:content_type =&gt;&#8217;multipart/alternative&#8217;,<br />
:content_transfer_encoding =&gt; &#8217;8bit&#8217;,<br />
&#8220;X-Mailer&#8221; =&gt; &#8220;Ruby (1.9.2)&#8221;<br />
).deliver<br />
end</p></blockquote>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/09/convert-utf-8-to-chinese-in-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails ActionMailer STARTTLS bug solution</title>
		<link>http://blog.idifysolutions.com/2011/09/rails-actionmailer-starttls-bug-solution/</link>
		<comments>http://blog.idifysolutions.com/2011/09/rails-actionmailer-starttls-bug-solution/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 07:08:22 +0000</pubDate>
		<dc:creator>Deepak</dc:creator>
				<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=101</guid>
		<description><![CDATA[This is a common rails mailer issue and bug new programmers, Net::SMTPAuthenticationError in InviteController#send_email_invites 530 5.7.0 Must issue a STARTTLS command first. u10sm46215072pbr.12 the solution of this problem is to include following settings in your environment.rb file config/environments/development.rb -----------------------------------     require 'tlsmail' #key but not always described     Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)        ActionMailer::Base.delivery_method [...]]]></description>
			<content:encoded><![CDATA[<p>This is a common rails mailer issue and bug new programmers,</p>
<h1>Net::SMTPAuthenticationError in InviteController#send_email_<wbr>invites</wbr></h1>
<pre>530 5.7.0 Must issue a STARTTLS command first. u10sm46215072pbr.12

the solution of this problem is to include following settings in your environment.rb file
</pre>
<pre><code>config/environments/development.rb
-----------------------------------
    require 'tlsmail' #key but not always described
    Net::SMTP.enable_tls(OpenSSL::SSL::VERIFY_NONE)   
    ActionMailer::Base.delivery_method = :smtp
    ActionMailer::Base.perform_deliveries = true
    ActionMailer::Base.raise_delivery_errors = true
   
    ActionMailer::Base.smtp_settings = {
      :enable_starttls_auto =&gt; true,  #this is the important part!
      :address        =&gt; 'smtp.gmail.com',
      :port           =&gt; 587,
      :domain         =&gt; 'xtargets.com',
      :authentication =&gt; :plain,
      :user_name      =&gt; '-------',
      :password       =&gt; '-------'
    }
   
</code></pre>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/09/rails-actionmailer-starttls-bug-solution/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/09/rails-actionmailer-starttls-bug-solution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Chargify API : Charge card using Basic authentication and Post Request</title>
		<link>http://blog.idifysolutions.com/2011/09/chargify-api-charge-card-using-basic-authentication/</link>
		<comments>http://blog.idifysolutions.com/2011/09/chargify-api-charge-card-using-basic-authentication/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 17:21:01 +0000</pubDate>
		<dc:creator>pardeep</dc:creator>
				<category><![CDATA[API]]></category>
		<category><![CDATA[Chargify]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://blog.idifysolutions.com/?p=61</guid>
		<description><![CDATA[require &#8220;net/https&#8221; require &#8220;uri&#8221; data = Hash.new data["charge"] = Hash.new data["charge"]["amount"] = amount_to_charge data["charge"]["memo"] = &#8216;This is the description of the one time charge.&#8217; or you can create hash using data = { &#8220;charge&#8221; =&#62;{ &#8220;amount&#8221;  =&#62; amount_to_change, &#8220;memo&#8221;    =&#62; &#8216;This is the description of the one time charge.&#8217;             [...]]]></description>
			<content:encoded><![CDATA[<p><strong>require &#8220;net/https&#8221; </strong></p>
<p><strong>require &#8220;uri&#8221;</strong></p>
<p>data = Hash.new</p>
<p>data["charge"] = Hash.new</p>
<p>data["charge"]["amount"] = amount_to_charge</p>
<p>data["charge"]["memo"] = &#8216;This is the description of the one time charge.&#8217;</p>
<p>or</p>
<p><span id="more-61"></span></p>
<p><strong>you can create hash using</strong></p>
<p>data = {</p>
<p>&#8220;charge&#8221; <strong>=&gt;{</strong></p>
<p>&#8220;amount&#8221; <strong> =&gt;</strong> amount_to_change,</p>
<p>&#8220;memo&#8221;   <strong> =&gt; </strong>&#8216;This is the description of the one time charge.&#8217;</p>
<p><strong>              }</strong></p>
<p>}</p>
<p>url = &#8220;https://#{<strong>Chargify.subdomain</strong>}.chargify.com/subscriptions/#{<strong>chargify_subscription.id</strong>}/charges.json&#8221;</p>
<p>#chargify.subdomain  is <strong>subdomain name</strong> assigned to your api</p>
<p>#chargify_subscription.id is <strong>Subscription id</strong></p>
<p>uri = URI.parse(url)</p>
<p>http = Net::HTTP.new(uri.host, uri.port)</p>
<p>http.use_ssl = true</p>
<p>http.verify_mode = OpenSSL::SSL::VERIFY_NONE</p>
<p>request = Net::HTTP::Post.new(uri.request_uri, initheader = {&#8216;Content-Type&#8217; =&gt;&#8217;application/json&#8217;})</p>
<p>request.body = data.to_json</p>
<p>request.basic_auth(&#8220;#{Chargify.api_key}&#8221;, &#8220;x&#8221;)</p>
<p>response = http.request(request)</p>
<p><strong>if response.code != &#8217;201&#8242;</strong></p>
<p>subscription_errors = response.to_json</p>
<p>error_message = &#8216;<strong>Sorry! We were unable to change your subscription.</strong>&#8216;</p>
<p>flash[:error] = error_message</p>
<p>redirect_to(&#8220;/account/finalize&#8221;)</p>
<p>return</p>
<p><strong>end</strong></p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://blog.idifysolutions.com/2011/09/chargify-api-charge-card-using-basic-authentication/" target="_blank" title="Share on Facebook">Share on Facebook</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.idifysolutions.com/2011/09/chargify-api-charge-card-using-basic-authentication/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
