If you need to update any gem in your system and you get some strange error message like the one below, maybe all you need to do is upgrade your RubyGems component.
ERROR: While executing gem ... (Gem::RemoteSourceException)
HTTP Response 403
I got the above error message when running the following command:
gem update --system
Another symptom that you need to upgrade your RubyGem is if you notice that the system responds different versions for your components:.
For instance, if you get this...
LinkedInhas announced today that they have released their API to allow developers all over the world to create applications that integrate better with their service.
All you have to do is access the LinkedIn Developer Network, get an account and API Key (to be used with the oAuth protocol) and you are good to go.
The major search engines, i.e. Google, Microsoft's Bing and Yahoo have agreed on a standard tag that every web page should use to tell these engines what is its preferred version. This is called the canonical URL of a page, nicely explained in this article at Google Webmaster Tools Central Blog. The meta-tag should be added at the head section of your HTML page:
<link rel="canonical" href="http://www.example.com/content/title_of_your_story_or_page_here" />
I found this nice article which proposes a ready-to-use debug popup window. All you have to do is add a simple command at the end of your application layout and a popup will show all the information regarding the request, session, response, flash variables and more.
I wrote an article the other day stating that I had no idea why someone would call a Helper method from inside a Controller in Rails.
I just found a reason. Here is what I needed to do:
Rails relies on the MVC separation to do its job, i.e. the Model handles the database interaction, the View handles the user and front-end interaction and the Controller handles the business logic and flow of the information.
After searching a little bit for a simple way to read the request parameters sent to the server, I normally found references telling people to use the apache_request_headers() or the getAllHeaders() (which is actually a wrapper for the previous one) function, but these will only work if you are running php as an apache module. Well, this is not the case for me, as I use Locaweb (a famous hosting service in Brazil).