  
<div id="snippet_80" class="snippet">
  <h2><a href="/snippets/80-Fixing-config-breakpoint-server-has-been-deprecated-and-has-no-effect-when-using-Rails-Edge" title="Fixing &quot;config.breakpoint_server has been deprecated and has no effect&quot; when using Rails Edge - Ruby - rails, edge, debug, deprecated">Fixing "config.breakpoint_server has been deprecated and has no effect" when using Rails Edge</a></h2>
  <div class="details">
    <a style="background-color: #FFFF94;" href="http://snippets.aktagon.com/languages/124-Ruby">
      Ruby</a> posted over 2 years ago by christian
          
  </div>

  <div class="body">
    <p>You might get this error if you&#8217;re using Rails Edge: <strong>config.breakpoint_server has been deprecated and has no effect</strong>:</p>


	<p>To fix the error we need to remove the following from <strong>config/environments/development.rb</strong>:
<pre class="active4d"><span class="line-numbers">   1 </span> config.<span class="FunctionName">breakpoint_server</span> <span class="Operator">=</span> <span class="BuiltInConstant">true</span>
</pre></p>


	<p>Next install ruby-debug:
<pre class="active4d"><span class="line-numbers">   1 </span> gem install ruby<span class="Operator">-</span>debug
</pre></p>


	<p>Then add this to the end of <strong>config/environments/development.rb</strong>:
<pre class="active4d"><span class="line-numbers">   1 </span> <span class="Keyword">require</span> <span class="String"><span class="String">'</span>ruby-debug<span class="String">'</span></span>
</pre></p>


	<p>Next, start your server, and the error should be gone&#8230;</p>


	<p>To debug your code just add a call to <strong>debugger</strong>:</p>


	<p><pre class="active4d"><span class="line-numbers">   1 </span> <span class="Keyword">class</span> <span class="TypeName">MySillySpace</span> ...
<span class="line-numbers">   2 </span>   <span class="Keyword">def</span> <span class="FunctionName">create</span>
<span class="line-numbers">   3 </span>     debugger <span class="LineComment"><span class="LineComment">#</span> add this line</span>
<span class="line-numbers">   4 </span>   <span class="Keyword">end</span>
</pre></p>


	<p>Now when you access the  URL  with your browser you&#8217;ll have access to the debugger from the console window.</p>


	<p>To learn how to use ruby-debug, read <a href="http://www.datanoise.com/articles/2006/07/12/tutorial-on-ruby-debug">this tutorial</a> written by the ruby-debug author.</p>
  </div>

  <div style="font-size: 0.8em;margin:0.5em;">
    
      Tagged <a href="/tags/9-rails">rails</a>, <a href="/tags/130-edge">edge</a>, <a href="/tags/66-debug">debug</a>, <a href="/tags/191-deprecated">deprecated</a>
    
    
  </div>
</div>



  
<div id="snippet_52" class="snippet">
  <h2><a href="/snippets/52-Fixing-warning-already-initialized-constant-OPTIONS-" title="Fixing &quot;warning: already initialized constant OPTIONS&quot; - Shell Script (Bash) - rails, edge, mongrel, mephisto">Fixing "warning: already initialized constant OPTIONS"</a></h2>
  <div class="details">
    <a style="background-color: #FFFF94;" href="http://snippets.aktagon.com/languages/131-Shell-Script-Bash-">
      Shell Script (Bash)</a> posted over 2 years ago by christian
          
  </div>

  <div class="body">
    <p>If you&#8217;re using Edge Rails and mongrel you might have seen this error:
<pre class="active4d"><span class="line-numbers">   1 </span> warning: already initialized constant OPTIONS
</pre></p>


	<p>There&#8217;s a bug report <a href="http://dev.rubyonrails.org/ticket/9743">here</a> that explains this problem in detail.</p>


	<p>The solution for me was to rerun the freeze command:</p>


	<p><pre class="active4d"><span class="line-numbers">   1 </span> rake rails:freeze:edge
</pre></p>


	<p>You might also get &#8220;warning: already initialized constant  OPTIONS &#8221; error if you haven&#8217;t installed a gem your software relies on.  In the following example openssl should be installed:</p>


	<p><pre class="active4d"><span class="line-numbers">   1 </span> /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:<span class="Keyword">in</span> <span class="String"><span class="String">`</span>gem_original_require’: no such file to load—openssl (MissingSourceFile)</span>
</pre></p>


	<p>ActiveResource might also be the problem:</p>


	<p><pre class="active4d"><span class="line-numbers">   1 </span> gem install activeresource --source http://gems.rubyonrails.org
</pre></p>
  </div>

  <div style="font-size: 0.8em;margin:0.5em;">
    
      Tagged <a href="/tags/9-rails">rails</a>, <a href="/tags/130-edge">edge</a>, <a href="/tags/91-mongrel">mongrel</a>, <a href="/tags/233-mephisto">mephisto</a>
    
    
  </div>
</div>






