Created
June 10, 2011 12:59
-
-
Save mkristian/1018786 to your computer and use it in GitHub Desktop.
rails-3.1.0.rcX with jruby
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
--- gems/activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/database_statements.rb.orig 2011-06-10 18:03:48.301647172 +0530 | |
+++ gems/activerecord-3.1.0.rc4/lib/active_record/connection_adapters/abstract/database_statements.rb 2011-06-10 18:03:48.301647172 +0530 | |
@@ -7,5 +7,5 @@ | |
# column values as values. | |
def select_all(sql, name = nil, binds = []) | |
- select(sql, name, binds) | |
+ select(sql, name)#, binds) | |
end | |
@@ -389,5 +389,5 @@ | |
def last_inserted_id(result) | |
- row = result.rows.first | |
+ row = result.rows.first if result | |
row && row.first | |
end |
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
[WARNING] [2011-06-10 18:23:05] INFO WEBrick 1.3.1 | |
[WARNING] [2011-06-10 18:23:05] INFO ruby 1.8.7 (2011-05-23) [java] | |
[WARNING] [2011-06-10 18:23:10] INFO WEBrick::HTTPServer#start: pid=15828 port=3000 | |
[INFO] | |
[INFO] | |
[INFO] Started GET "/users" for 127.0.0.1 at Fri Jun 10 18:23:23 +0530 2011 | |
[INFO] (0.0ms) SELECT name | |
[INFO] FROM sqlite_master | |
[INFO] WHERE type = 'table' AND NOT name = 'sqlite_sequence' | |
[INFO] | |
[INFO] Processing by UsersController#index as HTML | |
[INFO] User Load (0.0ms) SELECT "users".* FROM "users" | |
[INFO] Rendered users/index.html.erb within layouts/application (13.0ms) | |
[INFO] Completed 200 OK in 68ms (Views: 60.0ms | ActiveRecord: 0.0ms) | |
[INFO] getIds() | |
[INFO] | |
[INFO] | |
[INFO] Started GET "/assets/application.js" for 127.0.0.1 at Fri Jun 10 18:23:24 +0530 2011 | |
[INFO] Compiled ~/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/javascripts/application.js (36ms) (pid 15828) | |
[INFO] Compiled ~/projects/sandbox/rails3.1/rails3.1-ar-rc4/target/rubygems/gems/jquery-rails-1.0.9/vendor/assets/javascripts/jquery.js (18ms) (pid 15828) | |
[INFO] Compiled ~/projects/sandbox/rails3.1/rails3.1-ar-rc4/target/rubygems/gems/jquery-rails-1.0.9/vendor/assets/javascripts/jquery_ujs.js (3ms) (pid 15828) | |
[INFO] Error compiling asset application.js: | |
[INFO] NameError: uninitialized constant JavaLang | |
[INFO] (in /home/kristian/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/javascripts/users.js.coffee) | |
[INFO] Served asset /application.js - 500 Internal Server Error | |
[INFO] | |
[INFO] | |
[INFO] | |
[INFO] Started GET "/assets/application.css" for 127.0.0.1 at Fri Jun 10 18:23:25 +0530 2011 | |
[INFO] Compiled ~/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/stylesheets/application.css (15ms) (pid 15828) | |
[INFO] Compiled ~/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/stylesheets/scaffolds.css.scss (118ms) (pid 15828) | |
[INFO] Compiled ~/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/stylesheets/users.css.scss (13ms) (pid 15828) | |
[INFO] Served asset /application.css - 304 Not Modified (179ms) (pid 15828) | |
[INFO] | |
[INFO] | |
[INFO] Started GET "/users/new" for 127.0.0.1 at Fri Jun 10 18:23:28 +0530 2011 | |
[INFO] Processing by UsersController#new as HTML | |
[INFO] Rendered users/_form.html.erb (154.0ms) | |
[INFO] Rendered users/new.html.erb within layouts/application (191.0ms) | |
[INFO] Completed 200 OK in 224ms (Views: 214.0ms | ActiveRecord: 0.0ms) | |
[INFO] | |
[INFO] | |
[INFO] Started GET "/assets/application.css" for 127.0.0.1 at Fri Jun 10 18:23:28 +0530 2011 | |
[INFO] Served asset /application.css - 304 Not Modified (1ms) (pid 15828) | |
[INFO] getIds() | |
[INFO] | |
[INFO] | |
[INFO] Started GET "/assets/application.js" for 127.0.0.1 at Fri Jun 10 18:23:28 +0530 2011 | |
[INFO] Compiled ~/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/javascripts/application.js (36ms) (pid 15828) | |
[INFO] Error compiling asset application.js: | |
[INFO] NameError: uninitialized constant JavaLang | |
[INFO] (in /home/kristian/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/javascripts/users.js.coffee) | |
[INFO] Served asset /application.js - 500 Internal Server Error | |
[INFO] | |
[INFO] | |
[INFO] | |
[INFO] Started POST "/users" for 127.0.0.1 at Fri Jun 10 18:23:32 +0530 2011 | |
[INFO] Processing by UsersController#create as HTML | |
[INFO] Parameters: {"utf8"=>"✓", "authenticity_token"=>"mvRTkLrgzYm4Gz0KMJUsk8mWM5m2SBvv5CvmxHvMUOU=", "user"=>{"name"=>"asdad"}, "commit"=>"Create User"} | |
[INFO] Redirected to | |
[INFO] Completed 404 Not Found in 71ms | |
[INFO] | |
[INFO] ActionController::RoutingError (No route matches {:action=>"show", :controller=>"users", :id=>#<User id: nil, name: "asdad", created_at: "2011-06-10 12:53:32", updated_at: "2011-06-10 12:53:32">}): | |
[INFO] app/controllers/users_controller.rb:47:in `create' | |
[INFO] app/controllers/users_controller.rb:45:in `create' | |
[INFO] | |
[INFO] Rendered target/rubygems/gems/actionpack-3.1.0.rc4/lib/action_dispatch/middleware/templates/rescues/routing_error.erb within rescues/layout (8.0ms) |
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
[INFO] Error compiling asset application.js: | |
[INFO] NameError: uninitialized constant JavaLang | |
[INFO] (in /home/kristian/projects/sandbox/rails3.1/rails3.1-ar-rc4/app/assets/javascripts/users.js.coffee) | |
[INFO] Served asset /application.js - 500 Internal Server Error |
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
$ java -jar jruby-complete-1.6.2.jar --version | |
jruby 1.6.2 (ruby-1.8.7-p330) (2011-05-23 e2ea975) (OpenJDK 64-Bit Server VM 1.6.0_22) [linux-amd64-java] | |
# install rails-3.1.0.rcX application | |
$ java -jar jruby-complete-1.6.2.jar -S rails new myapp -m http://jruby.org/rails3.rb | |
$ cd myapp | |
$ java -jar jruby-complete-1.6.2.jar script/rails generate scaffold user name:string | |
apply patch below. the first part is for getting User.all working (no fix) and the second line is to the rake db:migrate working which would be a valid fix for me. | |
$ java -jar jruby-complete-1.6.2.jar rake db:migrate | |
$ java -jar jruby-complete-1.6.2.jar script/rails server | |
url: http://localhost:3000/users | |
url: http://localhost:3000/users/new | |
add new user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment