This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installing patron 0.4.20 with native extensions | |
Gem::Ext::BuildError: ERROR: Failed to build gem native extension. | |
/home/ubuntu/.rbenv/versions/2.2.3/bin/ruby -r ./siteconf20151121-13137-yck58r.rb extconf.rb | |
checking for curl-config... no | |
checking for main() in -lcurl... no | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of necessary | |
libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get YouTube ID from various YouTube URL | |
# Ruby port from JavaScript version: https://gist.github.com/takien/4077195/ | |
def get_youtube_id(url) | |
id = '' | |
url = url.gsub(/(>|<)/i,'').split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/) | |
if url[2] != nil | |
id = url[2].split(/[^0-9a-z_\-]/i) | |
id = id[0]; | |
else |