Ruby on Rails – unable to convert “\x89” from ASCII-8BIT to UTF-8 for xxx/xxxx/xxxx

You need to update / install a version of the rdoc gem that supports the conversion. Then these errors won’t appear during generation of the documentation when you install rails or when you regenerate the documentation. gem install rdoc Then to regenerate the documentation gem rdoc –all –overwrite

How to modify a Ruby gem

Download its source code into a separate folder (perhaps from github). Then modify your Gemfile to point to the source directly so that you can edit it and test your changes directly. For example, let’s say that you want to edit the secure_headers gem and that you’ve cloned it into ~/workspace/secureheaders. Then you can use … Read more

require ‘rubygems’

require ‘rubygems’ will adjust the Ruby loadpath allowing you to successfully require the gems you installed through rubygems, without getting a LoadError: no such file to load — sinatra. From the rubygems-1.3.6 documentation: When RubyGems is required, Kernel#require is replaced with our own which is capable of loading gems on demand. When you call require … Read more

ArgumentError (too few arguments): when calling format.json on rails 4.04

Mostly you would get the error ArgumentError (too few arguments): on the format when you forget to call this part of code within the block to respond_to method call. Your code should actually look like def action_name respond_to do |format| ## Add this format.json { render json: {}, status: :ok} format.html ## Other format end … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)