ALL
A plugin to update last_error in Delayed Job
delayed_job is a process based asynchronous task processing gem which can be ran at background. It will fork the specified number of processes to execute the tasks asynchronously. The task status is usually stored in the database so that it can be easily integrated into a Rails application where asynchronous job execution is desired.Normally when a job fails to execute or error occurs, it would save the error into the database with the column last_error. Ideally all these will be handled by the delayed_job gem itself, we no need to worry about anything. However, in some extreme cases, we ...
4,044 0 RUBY RUBY ON RAILS DELAYED JOB LAST_ERROR
Handle NXDomain error when resolving IP address in Ruby DNS resolver
In another post, we covered how to resolve SystemStackError when resolving IP address in Ruby. In this post, we would cover another common issue where a NXDomain error is returned when resolving an IP address. The NXDomain error means that the queried domain name does not exist in the DNS.In Ruby, DNS resolver library will use /etc/resolv.conf by default get the name servers to resolve the domain name. There are multiple DNS name servers can be specified in /etc/resolv.conf with below format.nameserver nameserver nameserver ...By default, only the top MAXNS name servers(3 in Linux by...
4,534 0 RUBY RUBY ON RAILS NETWORK DNS NXDOMAIN
Resolve SystemStackError issue when resolving IP address in Ruby
In Ruby, Resolv is the default DNS resolution implementation. It can be used to resolve IP address of a hostname. To use it, one just needs to require 'resolv' in the code. But sometimes, a user would want to check /etc/hosts first or some other mechanisms to resolve an IP address. In this case, one can require 'resolv-replace' and then replace the default DNS resolvers with customized DNS resolvers.For example, using resolv-replace, one would writerequire 'resolv-replace'Resolv::DefaultResolver.replace_resolvers([Resolv::Hosts.new, Resolv::DNS.new])Resolv.getaddress 'some-site.com'In this cas...
5,736 0 RUBY RUBY ON RAILS NETWORK
Fix issue "cannot load such file -- bcrypt_ext (LoadError)"
bcrypt() is a sophisticated and secure hash algorithm designed by The OpenBSD project for hashing passwords. The bcrypt Ruby gem provides a simple wrapper for safely handling passwords.However, sometimes the rails application would fail to start after installing the bcrypt gem on Windows. The error would look similar to below.The issue is that it fails to load the bcrypt_ext which is the native built extension, the reason may be the library is wrongly built. To fix this issue, below steps can be followed. Open a command consolecd to the gem directory C:\RailsInstaller\Ruby2.2.0\...
9,289 1 RUBY SOLUTION RUBY ON RAILS BCRYPT LOAD ERROR
Resolve stylesheet_link_tag fails to work in Ruby on Rails
When developing Ruby On Rails application, developers sometimes will see an unexpected behavior where the application cannot be loaded due to "TypeError: Object doesn't support this property or method" when invoking stylesheet_link_tag. The symptom looks like And the Rails log will show something similar to belowThe error occurs because there is some problem finding the correct assets which are located in app/assets. To resolve the issue, you can following below steps.Add gem 'coffee-script-source', '1.8.0' into Gemfile and run bundle install thenRun bundle update coffee-script-sourceRest...
10,425 2 RUBY ON RAILS STYLESHEET_LINK_TAG JAVASCRIPT_INCLUDE_TAG TYPEERROR
How to Choose the Right Ruby on Rails Hosting Platform
Over the last decade, Ruby on Rails has become an increasingly popular framework for web-based apps. At its beginnings, hosting Rails was a real challenge and required a fair amount of relevant know-how. Nowadays, there are dozens of hosting platforms that provide cheap and accessible services for building and deploying Rails apps.In general, the choice of hosting should be based on your requirements and technical skills – some platforms are much more difficult to handle than others. Here's a selection of some of the most renowned Rails hosting platform s– read on to see how they d...
6,241 0 RUBY ON RAILS RUBY HOSTING
6 Reasons Why Devs Should Learn Ruby on Rails
Ruby on Rails has during the last ten years become an increasingly popular framework for web app development. The current shaky economy and rapidly changing tech environment requires the art of app building to be faster and more cost-effective. That's why becoming fluent in Rails might be a great way for developers to expand their knowledge, which can land them a number of great jobs or interesting projects, as well as grant access to a thriving community.Let's start with the basics – what exactly is Ruby on Rails? It's a web application framework written in Ruby programming language tha...
7,059 0 ADVANTAGE RUBY ON RAILS