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
PATH | |
remote: . | |
specs: | |
survey-gizmo-ruby (6.4.0) | |
activesupport (>= 3.0, < 5.1) | |
addressable (~> 2) | |
awesome_print (~> 1) | |
faraday (~> 0.9, >= 0.9.1) | |
faraday_middleware (~> 0.9) | |
i18n |
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
# I'm currently using Devise along with Resque's resque-web UI. I have resque-web running | |
# as an embedded rack application inside of my main Rails app with the following line in my | |
# my routes.rb file: | |
# | |
# mount Resque::Server.new, :at => "/resque" | |
# | |
# This makes resque-web expect its static assets to be found in your site's /public/resque | |
# folder, where they won't be. | |
# | |
# The answer is to copy or symlink to those assets which are found in the gem's own public |
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
require 'java' | |
class Watcher | |
java_import java.nio.file.FileSystems | |
java_import java.nio.file.StandardWatchEventKinds | |
IGNORE_PATHS = [ | |
/\/vendor/, | |
/\/public/, | |
/\/tmp/, |
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
rvm use jruby-1.7.3@driptest --create | |
export JRUBY_OPTS="--1.9 -J-Xmx2048m -J-Xms2048m -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify" | |
# export JRUBY_OPTS="--1.9 -J-Xmx2048m -J-Xms2048m" | |
if [ -f /usr/local/bin/drip ]; | |
then | |
export JAVACMD=`which drip` | |
export DRIP_INIT_CLASS=org.jruby.main.DripMain | |
fi |
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
rvm use jruby-1.7.3@fp2 --create | |
export JRUBY_OPTS="--1.9 -J-Xmx2048m -J-Xms2048m -J-XX:+TieredCompilation -J-XX:TieredStopAtLevel=1 -J-noverify" | |
# export JRUBY_OPTS="--1.9 -J-Xmx2048m -J-Xms2048m" | |
if [ -f /usr/local/bin/drip ]; | |
then | |
export JAVACMD=`which drip` | |
export DRIP_INIT_CLASS=org.jruby.main.DripMain | |
fi |
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
import times | |
var x = parse("1900-01-01", "yyyy-MM-dd") | |
echo($x) | |
echo($x.timeInfoToTime()) | |
... | |
Wed Jan 1 00:00:00 1900 | |
Wed Dec 31 17:59:59 1969 |
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
#!/usr/bin/env ruby -w | |
require 'zlib' | |
in_file = File.join('test/examples/rgb.jpg') | |
out_file = 'rgb.out.jpg' | |
gz_file = 'test.jpg.gz' | |
chunk_size = 2**16 | |
Zlib::GzipWriter.open(gz_file) do |gz| |
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
$ JRUBY_OPTS="--1.8" torquebox run | |
Booting AS7 from configuration /Users/jeremy/.rvm/gems/jruby-1.7.0.RC1@fp2/gems/torquebox-server-2.1.2-java/jboss/standalone/configuration/standalone.xml | |
/bin/sh bin/standalone.sh -Djruby.home=/Users/jeremy/.rvm/rubies/jruby-1.7.0.RC1 --server-config=standalone.xml | |
========================================================================= | |
JBoss Bootstrap Environment | |
JBOSS_HOME: /Users/jeremy/.rvm/gems/jruby-1.7.0.RC1@fp2/gems/torquebox-server-2.1.2-java/jboss | |
JAVA: java |
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
09:42:17,519 INFO [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.x.incremental.1 "Steropes" started in 2644ms - Started 171 of 271 services (98 services are passive or on-demand) | |
09:42:17,524 INFO [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Starting deployment of "fp2-knob.yml" | |
09:42:17,910 INFO [org.torquebox.core] (MSC service thread 1-12) evaling: /Users/jeremy/Source/fp2/config/torquebox.rb | |
09:42:18,437 ERROR [org.torquebox.core.runtime] (MSC service thread 1-8) Error during evaluation: ERB.new( %q{postgresql}).result: org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `encoding' for "postgresql":String | |
at Compiler.compile(/Users/jeremy/.rvm/rubies/jruby-1.6.7.2/lib/ruby/1.9/erb.rb:514) at ERB.initialize(/Users/jeremy/.rvm/rubies/jruby-1.6.7.2/lib/ruby/1.9/erb.rb:702) at (Anonymous).(root)(<script>:1) | |
09:42:19,063 INFO [org.jboss.as.osgi] (MSC service thread 1-8) JBAS011907: Register module: Module "deployment.fp2-knob.yml:main" from Serv |
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
jruby-1.6.7.2 :045 > "Foo\nBar".to_yaml | |
=> "--- ! 'Foo\n\n Bar'\n...\n" | |
jruby-1.6.7.2 :046 > "Foo\r\nBar".to_yaml | |
=> "--- ! \"Foo\\r\\nBar\"\n...\n" |
NewerOlder