Input string is longer than NAMEDATALEN 1 (63) on rails4
This error occurs because when you rename a table, the indexes are also renamed, and most likely one of your indexes auto-generated name is too long.
Adjacent XJS react
The following error:
Error: Parse Error: Adjacent XJS elements must be wrapped in an enclosing tag
Is probably because you are not returning one element, but multiple. So, return:
<div>
<SomeComponent/>
<SomeOtherComponent/>
</div>
instead of:
<SomeComponent/>
<SomeOtherComponent/>
debug cors with curl
Example take from here
curl -H "Origin: http://example.com" --verbose \
https://www.googleapis.com/discovery/v1/apis?fields=
adding time in go
import "time"
now := time.Now()
end := now.Add(1 * time.Hour)
// formatting as iso8601
now_string := now.Format(time.RFC3339)
timing out with curl
To “timeout” a request after a number of seconds, use the -m switch:
curl -m 5 some_url
And in case the web server doesn’t respond after 5 seconds, curl will exit with an error code.
long lines in csv reports
If you have some CSV files with lines longer than 990 chars, you may notice that the lines get splitted. The fix is described here
attachments['file.csv']= { :data=> ActiveSupport::Base64.encode64(@string), :encoding => 'base64' }