{"id":6381,"date":"2014-04-17T01:13:51","date_gmt":"2014-04-17T01:13:51","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/17\/ruby-on-railsrelated-issues-collection-of-common-programming-errors\/"},"modified":"2014-04-17T01:13:51","modified_gmt":"2014-04-17T01:13:51","slug":"ruby-on-railsrelated-issues-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/17\/ruby-on-railsrelated-issues-collection-of-common-programming-errors\/","title":{"rendered":"ruby-on-railsRelated issues-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/18e42b0ddc143340cfb072987f45ca50?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nPeter Mortensen<br \/>\narchitecture ruby-on-rails node.js rewrite<br \/>\nPlease tell me if:Node.js will make our site faster! Node.js will consume fewer server resources, we can save money! Node.js will make us more productive! Node.js means we can share client and server side JavaScript code.To clarify, we&#8217;re rewriting a frontend server, which will talk to our existing Ruby on Rails application as an API. Meanwhile, we&#8217;ll refactor our Ruby on Rails application into services.More details on the existing architecture:Memcached for HTML partials caching Redis for sessi<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/6022fa1cba81782d5bdb214d48a277aa?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nairlok<br \/>\nruby-on-rails ruby ubuntu rvm linkparser<br \/>\nI am using rvm, ruby 1.9.3, link-grammar (sudo apt-get install link-grammar), and pkg-config. I have the same setup on OSX, and it works great.Running &#8216;gem install linkparser&#8217; fails on this:\/usr\/local\/include\/link-grammar\/link-includes.h:16:36fatal error: link-grammar\/api-types.h: No such file or directoryI&#8217;ve tried installing link-grammer manually as well, then running:gem install linkparser &#8212; &#8211;with-link-grammar=\/usr\/local gem install linkparser &#8212; &#8211;with-link-grammar=\/usr\/share gem install l<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/7dc9468b4611468761a93b49ee43be4e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\njackerman09<br \/>\nruby-on-rails git heroku<br \/>\nI have been working on this rails project for weeks (it is deployed using Heroku), pushing to GitHub frequently without a problem. I am now getting this error:error: The requested URL returned error: 504 while accessing https:\/\/github.com\/my_git_name\/my_repository_name.git\/info\/refs?service=git-receive-pack fatal: HTTP request failedAny idea what might be causing this? Thanks!<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/1c39f3643f2ad2ab87508a7a48060943?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nbharath<br \/>\nruby-on-rails git rubygems bundler ruby-on-rails-3.2<br \/>\nI Have This in my GemFilesource &#8216;https:\/\/rubygems.org&#8217;gem &#8216;rails&#8217;, &#8216;3.2.3&#8217;# Bundle edge Rails instead: # gem &#8216;rails&#8217;, :git =&gt; &#8216;git:\/\/github.com\/rails\/rails.git&#8217;gem &#8216;sqlite3&#8217;gem &#8220;nested_form&#8221;, :git =&gt; &#8220;https:\/\/github.com\/ryanb\/nested_form.git&#8221; gem &#8216;lazy_high_charts&#8217;, :git =&gt; &#8220;https:\/\/github.com\/michelson\/lazy_high_charts.git&#8221;# Gems used only for assets and not required # in production environments by default. group :assets dogem &#8216;sass-rails&#8217;, &#8216;~&gt; 3.2.3&#8217;gem &#8216;coffee-rails&#8217;, &#8216;~&gt; 3.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/fbbe2adedf4308c5978d92fa1a8dbbff?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\ncjm2671<br \/>\nruby-on-rails ruby rescue<br \/>\nI&#8217;m trying to run a command that might fail sometimes. When it fails, it throws an exception.What I&#8217;d like it to do is just log the error quietly and continue executing the next line below it, rather than aborting and going into the &#8216;rescue&#8217; block. How should I approach this?My current code is as follows:rescue_from &#8216;Gibbon::MailChimpError&#8217; do |exception|logger.error(&#8220;MAILCHIMP: #{exception}&#8221;)endWhen I call the Mailchimp API, sometimes there is an error, and this disrupts the flow of my applicat<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/566e636647de5fa8ea092a23dd5c533d?s=32&amp;d=identicon&amp;r=PG&amp;f=1\" \/><br \/>\ndachi<br \/>\nruby-on-rails git openshift<br \/>\nWhen trying to clone my Rails application via Git, I am geting:Cloning into ruby&#8230; ssh: Could not resolve hostnameruby-xxxxxxxxx.rhcloud.com: nodename nor servname provided, or notknown fatal: The remote end hung up unexpectedlyFor this, I am running the following command:$ git clone ssh:\/\/5311f57b5973ca7b7b00012b@ruby-xxxxxxxxx.rhcloud.com\/~\/git\/ruby.git\/I can access the app from the web console &amp; have installed the rhc gem &amp; the set up was successful.Anybody know what I can do to try<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/bd1a5dc3e5f270014f2d1b61e9e136bf?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nstefkas<br \/>\nruby-on-rails git heroku push<br \/>\nWhen I git push on heroku, I receive this fatal: Not a git repository (or any of the parent directories): .git error many times. Everything works fine in my application and the push completes normally. I just wonder why this happens. I also see the same message 4-5 times in my logs in heroku, when a scheduler task runs. Any idea? Thanks!git push staging masterCounting objects: 41, done. Delta compression using up to 4 threads. Compressing objects: 100% (21\/21), done. Writing objects: 100% (21\/2<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/dd7cc06b1b1c347e172c6ba532937173?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nZack<br \/>\nruby-on-rails ruby shell heroku<br \/>\nIm getting a fatal error in my Ruby and Rails Command Line when I try to bundle install &#8211;without productionfor Heroku.I&#8217;m following the instructions here: http:\/\/installfest.railsbridge.org\/installfest\/create_and_deploy_a_rails_appThis step is in 7.2. Everything was working fine until this. Can anyone point me in the right direction as to why this is failing?It says something along the lines of &#8216;group&#8217; no block given (yield) (LocalJumpError)ThanksEdit: Gemfilesource &#8216;https:\/\/rubygems.org&#8217;# Bun<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/ca9ccb8fc9b8788e83bd57ac3ff9ded6?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBram Jetten<br \/>\njavascript ruby-on-rails debian v8<br \/>\nI&#8217;m trying to deploy my Rails app to a new VPS which runs with Debian. I&#8217;m using Nginx and Phusion Passenger as my server.I&#8217;ve installed Node.js as a JavaScript runtime. Sadly I&#8217;m seeing the following error message:Fatal error in v8::V8::AddGCPrologueCallback() V8 is no longer usableEdit:It is fixed now. Apparently gr security was causing the error.<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/a2d818d801ce38a33807f68fdd92043a?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nBoltClock<br \/>\nruby-on-rails installation osx-lion<br \/>\nI&#8217;m a n00b eager to get my hands on Ruby on Rails (OSX 10.7). But first I need to install it. Now I&#8217;ve spend 9 hours trying to get it to work but it always fails when I try to create a new project:$ rails new \/Users\/tom\/Documents\/14-Utveckling\/WhichTerminal exist identical README.rdoc identical Rakefile identical config.ru identical .gitignoreconflict Gemfile Overwrite \/Users\/tom\/Documents\/14-Utveckling\/WhichTerminal\/Gemfile? (enter &#8220;h&#8221; for help) [Ynaqdh] Yforce Gemfileexist app identic<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Peter Mortensen architecture ruby-on-rails node.js rewrite Please tell me if:Node.js will make our site faster! Node.js will consume fewer server resources, we can save money! Node.js will make us more productive! Node.js means we can share client and server side JavaScript code.To clarify, we&#8217;re rewriting a frontend server, which will talk to our existing Ruby [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6381","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6381","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6381"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6381\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6381"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6381"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6381"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}