I'm building a rails 5 app using bootstrap for css styling, and for the most part it has been working fine. However, for some reason today, when I went to localhost:3000 in development, only the html is being rendered without any of the bootstrap styling I've added. I understand that this is a rather general/vague question, but is there any reason why this would happen?
Here is the output of the bundle install I ran last:
Using rake 11.3.0
Using concurrent-ruby 1.0.2
Using i18n 0.7.0
Using minitest 5.9.1
Using thread_safe 0.3.5
Using builder 3.2.2
Using erubis 2.7.0
Using mini_portile2 2.1.0
Using rack 2.0.1
Using nio4r 1.2.1
Using websocket-extensions 0.1.2
Using mime-types-data 3.2016.0521
Using arel 7.1.4
Using execjs 2.7.0
Using bcrypt 3.1.11
Using sass 3.4.22
Using byebug 9.0.6
Using coffee-script-source 1.10.0
Using method_source 0.8.2
Using thor 0.19.1
Using debug_inspector 0.0.2
Using orm_adapter 0.5.0
Using unf_ext 0.0.7.2
Using ffi 1.9.14
Using multi_json 1.12.1
Using rb-fsevent 0.9.8
Using net-http-digest_auth 1.4
Using net-http-persistent 2.9.4
Using ntlm-http 0.1.1
Using webrobots 0.1.2
Using puma 3.6.0
Using bundler 1.13.6
Using ruby_http_client 3.0.0
Using tilt 2.0.5
Using sqlite3 1.3.12
Using turbolinks-source 5.0.0
Using tzinfo 1.2.2
Using nokogiri 1.6.8.1
Using rack-test 0.6.3
Using warden 1.2.6
Using sprockets 3.7.0
Using websocket-driver 0.6.4
Using mime-types 3.1
Using autoprefixer-rails 6.5.3
Using uglifier 3.0.3
Using font-awesome-sass 4.7.0
Using coffee-script 2.4.1
Using figaro 1.1.1
Using unf 0.1.4
Using rb-inotify 0.9.7
Using sendgrid-ruby 4.0.6
Using turbolinks 5.0.1
Using activesupport 5.0.0.1
Using loofah 2.0.3
Using mail 2.6.4
Using bootstrap-sass 3.3.7
Using domain_name 0.5.20161021
Using listen 3.0.8
Using rails-dom-testing 2.0.1
Using globalid 0.3.7
Using activemodel 5.0.0.1
Using jbuilder 2.6.0
Using spring 2.0.0
Using rails-html-sanitizer 1.0.3
Using http-cookie 1.0.3
Using activejob 5.0.0.1
Using activerecord 5.0.0.1
Using spring-watcher-listen 2.0.1
Using actionview 5.0.0.1
Using mechanize 2.7.5
Using actionpack 5.0.0.1
Using actioncable 5.0.0.1
Using actionmailer 5.0.0.1
Using railties 5.0.0.1
Using sprockets-rails 3.2.0
Using coffee-rails 4.2.1
Using responders 2.3.0
Using jquery-rails 4.2.1
Using material_icons 2.2.0
Using web-console 3.4.0
Using rails 5.0.0.1
Using sass-rails 5.0.6
Using devise 4.2.0
Bundle complete! 23 Gemfile dependencies, 83 gems now installed.
Gems in the group production were not installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.
And the beginning lines of my application.scss:
/*
* This is a manifest file that'll be compiled into application.css, which will include all the files
* listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
* files in this directory. Styles in this file should be added after the last require_* statement.
* It is generally better to create a new file per style scope.
*
*= require_tree .
*= require_self
*/
#import "bootstrap-sprockets";
#import "bootstrap";
#import "bootstrap/theme";
And the relevant part of my Gemfile:
# For scraping
gem 'mechanize'
# Devise
gem 'devise'
# bootstrap
gem 'bootstrap-sass', '~> 3.3.6'
# font-awesome
gem 'font-awesome-sass', '~> 4.7.0'
# for environment variables
gem 'figaro'
# sendgrid
gem 'sendgrid-ruby'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platform: :mri
end
EDIT: Per the request below, I've added the landing page, and also the application.html.erb in layouts:
<% content_for :top_content do %>
<div class="jumbotron">
<div class="container">
<h1>Welcome!</h1>
<p class="center"> Some Content. We're currently in development - please contact us using the link below if you are interested in learning more. </p>
<p class="center">Register or Login to get started</p>
<p class="center">
<%= link_to 'Register', new_user_registration_path, class: 'btn btn-primary btn-lg' %>
<%= link_to 'Log In', new_user_session_path, class: 'btn btn-primary btn-lg' %>
</p>
</div>
</div>
<% end %>
Appliction.html.erb:
<!DOCTYPE html>
<html>
<head>
<title>TITLE</title>
<%= csrf_meta_tags %>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
</head>
<body>
<%= render 'layouts/header' %>
<div class="container">
<% flash.each do |key, value| %>
<div class="alert alert-<%= key %>">
<%= value %>
</div>
<% end %>
</div>
<%= yield :top_content %>
<div class="container">
<h1><%= yield :header %></h1>
<%= yield %>
</div>
<div class = "container">
<%= render 'layouts/footer' %>
</div>
</body>
</html>
Related
I am a beginner of Ruby on Rails and web development. I am taking a online course and keep failing the lecture example.
My problem is my courses_controller, index action.
Controller: my_first_app/controllers/courses_controller.rb
class CoursesController < ApplicationController
def index
#search_term = 'jhu'
#courses = Coursera.for(#search_term)
end
end
Model: my_first_app/models/coursera.rb
class Coursera
include HTTParty
#default_options.update(verify: false) # Turn off SSL verification
base_uri 'https://api.coursera.org/api/catalog.v1/courses'
default_params fields: "smallIcon,shortDescription", q: "search"
format :json
def self.for term
get("", query: { query: term})["elements"]
end
end
View: my_first_app/views/index.html.erb
<h1>Search for - <%= #search_term %> </h1>
<table border = "1">
<tr>
<th>Image</th>
<th>Name</th>
<th>Description</th>
</tr>
<%= #courses.each do |course| %>
<tr>
<td><%= image_tag(course["smallIcon"]) %></td>
<td><%= course["name"] %></td>
<td><%= course["shortDescription"] %> </td>
</tr>
<% end %>
Routes: my_first_app/config/routes.rb
Rails.application.routes.draw do
get 'courses/index'
get 'greeter/hello'
get 'greeter/goodbye'
end
Gemfile:
source 'https://rubygems.org'
gem 'rails', '4.2.3'
gem 'sqlite3'
gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.3.0'
gem 'coffee-rails', '~> 4.1.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 2.0'
gem 'sdoc', '~> 0.4.0', group: :doc
group :development, :test do
gem 'byebug'
gem 'web-console', '~> 2.0'
gem 'spring'
gem 'httparty', '0.13.5'
end
I added the last gem to the Gemfile and run bundle, then I controlled +c to stopped and restarted the server and I got the error message:
JSON::ParserError in CoursesController#index
error message screenshot
I think it is saying that I parse a HTML instead of JSON, but I don't know how to fix it. Any help will be appreciated.
Original repository: https://github.com/jhu-ep-coursera/fullstack-course1-module3
According to the API documentation for Coursera, it looks like your base_uri might need to be:
base_uri 'https://api.coursera.org/api/courses.v1'
and then for fields in the default_params should (maybe) be:
default_params fields: "photoUrl,description", q: "search"
(changing the other occurrences of 'smallIcon' and 'shortDescription' with 'photoUrl' and 'description' in your app as well, since I don't see those fields in the api docs).
Once those changes are made you should end up going to urls like https://api.coursera.org/api/courses.v1?q=search&query=ruby&fields=photoUrl,description which is returning valid JSON. The current base_uri you are using is sending you to an HTML error page telling you Action not found. Since that's an HTML page, JSON can't parse it.
If you look at the date on the last commit in the Github repository you linked, the last commit was in November 2015, so nearly 2 years ago. Just super out of date, the API has probably changed a fair bit since then.
So...first time asking a question to StackOverflow...
I converted an existing Rails 4.2.5 app (using Ruby 2.2.4) to a Rails 5.1.3 app (using Ruby 2.4.1), following the Rails Guides and the RailsApps Project.
Firing up the development server produces:
Taruns-iMac:Play_Ball tarunchattoraj$ rails s
=> Booting Puma
=> Rails 5.1.3 application starting in development on http://localhost:3000
=> Run `rails server -h` for more startup options
Puma starting in single mode...
* Version 3.9.1 (ruby 2.4.1-p111), codename: Private Caller
* Min threads: 5, max threads: 5
* Environment: development
* Listening on tcp://0.0.0.0:3000
Use Ctrl-C to stop
which is what I would expect.
Navigating to localhost:3000, however, produces an the ActionController error:
Started GET "/" for 127.0.0.1 at 2017-08-13 11:05:38 -0400
(0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
ActionController::RoutingError (Couldn't find Api::KeepScoresHelper, expected it to be defined in helpers/api/keep_scores_helper.rb):
app/controllers/application_controller.rb:1:in `<top (required)>'
app/controllers/welcome_controller.rb:1:in `<top (required)>'
I expected to see my app running on the page normally.
My Question:
What is causing this ActionController::RoutingError (Couldn't find...) and how to correct it?
This question seems to be on point. I tried the solution of "touching" all the helper files but to no avail.
When I converted from Rails 4.2.5 to 5.1.3, I ran $ rails app:update and I overwrote most files--those in which I didn't have code specific to my app, but I chose not to overwrite config/routes.rb.
config/routes.rb:
Rails.application.routes.draw do
resources :alerts
get 'games/decide_game_view' => 'games#decide_game_view', as: :decide_game_view
resources :games
resources :game_hitting_stats
resources :game_pitching_stats
resources :locations
resources :players
get 'welcome/index'
get 'welcome/about'
resources :users do
resources :players
end
resources :sessions, only: [:new, :create, :destroy]
resources :teams do
resources :notes
end
# namespace :api, defaults: {format: :http} do
namespace :api do
match '/texts', to: 'texts#preflight', via: [:options]
resources :texts, only: [:create]
match '/keepscore/teams', to: 'keep_scores#preflight', via: [:options]
get 'keepscore/teams' => 'keep_scores#get_teams', as: :get_teams
match '/keepscore/roster', to: 'keep_scores#preflight', via: [:options]
get 'keepscore/roster' => 'keep_scores#get_roster', as: :get_roster
match '/keepscore/post_game_stats', to: 'keep_scores#preflight', via: [:options]
post 'keepscore/post_game_stats' => 'keep_scores#post_game_stats', as: :post_game_stats
end
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end
# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable
# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
root 'welcome#index'
end
ActionController seems to be telling me that it can't find the KeepScoresHelper Module and that its looking in helpers/api/keep_scores_helper.rb. But that file exists See Pic of App Controller and Helper Tree Structure.
The contents of helpers/api/keep_scores_helper.rb:
module API::KeepScoresHelper
end
Gemfile:
source 'https://rubygems.org'
ruby "2.4.1"
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '5.1.3'
gem 'puma'
gem 'pundit'
gem 'bcrypt'
gem 'active_model_serializers', '~> 0.10.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 5.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.2.2'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
gem 'jquery-turbolinks'
gem 'bootstrap-sass'
gem 'figaro'
gem 'pry'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
group :production do
gem 'pg'
gem 'rails_12factor'
end
group :test do
gem 'pundit-matchers', '~>1.0.1'
end
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'listen'
gem 'byebug'
gem 'web-console', '~> 3.5.1'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'rspec-rails'
gem 'shoulda'
gem 'faker'
gem 'factory_girl_rails'
gem 'rails-controller-testing'
end
group :development do
# Access an IRB console on exception pages or by using <%= console %> in views
gem 'sqlite3'
end
Of course any help is greatly appreciated...
In config/environments/development.rb, set:
config.action_controller.include_all_helpers = false
This returns Helpers to pre-Rails 5 behavior. Per RoR API, for Rails 5.1.3, "By default, each controller will include all helpers." Pre Rails 5, the controller would include a helper matched to its name. Making the setting as specified above returns to the Pre-Rails 5 behavior.
Adding in hopes of helping others that stumble across this.
Initial Trouble Shooting
I had this same issue when upgrading the same versions you mention in your question. I did upgrade from 4.2 to 5.0 first though then upgrade to 5.1.3 from there.
The first upgrade worked fine but I started receiving the same error message (e.g. uninitialized constant ActionController::RedirectBackError ... about not being able to find the helpers but this only happened when I jumped to rails 5.1.
I tried a lot of other fixes as outlined in this github issue as it seemed to be the same error but nothing worked and my paths all seemed to be correct (no discrepancies in path or casing).
My Fix
I ended up deleting all helpers and received a new error which lead me to finding the code in my app that was causing the problem.
# app/controllers/application_controller.rb
# Catch exceptions if :back is not set throughout the app. This is a fallback redirect if request.referer is not set.
rescue_from ActionController::RedirectBackError do |exception|
redirect_to key_activities_ministries_activities_path, alert: exception.message
end
That code was causing a Routing Error: uninitialized constant ActionController::RedirectBackError. But this error only appeared when I removed all of my helpers. I removed this code, put my helpers back, and restarted my server and everything worked as expected.
I've create a wrapper gem for connecting to a tibco queue & uploaded that gem to my local gemserver. When I try to include the wrapper gem in other projects, I get the following error:
Bundler could not find compatible versions for gem "jruby-jms":
In Gemfile:
jruby-jms (>= 1.2.0, ~> 1.2) java
tibco_client (>= 0) java depends on
jruby-jms (>= 1.2.0, ~> 1.2) ruby
jruby-jms (>= 0) java
jruby-jms (>= 0) ruby
Could not find gem 'jruby-jms (>= 1.2.0, ~> 1.2) ruby in any of the sources
I am trying to figure out how to list the runtime dependency but I can't find any instruction or examples:
spec.platform = 'java'
spec.add_runtime_dependency 'jruby-jms', '~> 1.2', '>= 1.2.0'
Does anybody have experience in resolving something like this? I'm using jruby-1.7.19 (also tried 1.7.4, same result).
I found the problem was in my Gemfile. Syntax found on stackoverflow.
gem 'tibco_client', :source => 'http://gemserver:9292', :platforms => 'jruby'
We're using Warbler to deploy our application to JBoss. The server seems to start fine, but when a request is sent to the application we get the following error:
...
JRuby-Rack startup
No such file to load -- lib/mylib
....
As you can see it seems to be crashing out when trying to load the mylib.jar, which is Java library we are using in the user.rb class. I've tripled checked that the mylib.jar file exists in the myapp/lib directory and also that it gets successfully packaged by Warbler (it lives in WEB-INF/lib/mylib.jar).
Please Note: I downgraded JRuby-Rack to 1.0.10 after running into the issue detailed here - NoMethodError: relative_url_root when deploying rails app on tomcat. So perhaps the issue has something to do with this?
I'm at a loss as to what's going on. Any ideas?
Other details that might prove useful:
Java Version: 1.6.0_22
JRuby Version: 1.6.5 (ruby-1.9.2-p136)
Ruby Language Level: 1.9
Gemfile:
gem 'rails', '3.1.1'
...
gem 'warbler'
gem 'jruby-rack', '1.0.10'
...
config/warble.rb:
...
config.dirs = %w(app config lib log vendor tmp)
...
config.webxml.jruby.compat.version = "1.9"
...
app/model/user.rb:
require 'java'
require 'lib/mylib.jar'
...
Full Back Trace:
...
14:53:49,552 INFO [Server] JBoss (MX MicroKernel) [4.3.0.GA_CP01 (build: SVNTag=JBPAPP_4_3_0_GA_CP01 date=200804211657)] Started in 28s:311ms
14:54:33,799 ERROR [STDERR] /usr/local/appserver/jboss4.3/server/ruby/tmp/deploy/tmp4492943940433390521myapp-exp.war/WEB-INF/gems/gems/rack-1.3.5/lib/rack.rb:14 warning: already initialized constant VERSION
14:54:37,614 ERROR [STDERR] /usr/local/appserver/jboss4.3/server/ruby/tmp/deploy/tmp4492943940433390521myapp-exp.war/WEB-INF/gems/gems/jruby-rack-1.0.10/lib/jruby/rack/version.rb:10 warning: already initialized constant VERSION
14:54:41,881 INFO [ContainerBase] Warning: no min runtimes specified.
14:54:41,888 INFO [ContainerBase] Warning: no max runtimes specified.
14:54:41,895 INFO [ContainerBase] An exception happened during JRuby-Rack startup
No such file to load -- lib/mylib
--- System
jruby 1.6.5 (ruby-1.9.2-p136) (2011-10-25 9dcd388) (Java HotSpot(TM) Server VM 1.6.0_22) [linux-i386-java]
Time: 2011-11-28 14:54:41 +0000
Server: JBossWeb/2.0.0.GA_CP05
jruby.home: file:/usr/local/appserver/jboss4.3/server/ruby/tmp/deploy/tmp4492943940433390521myapp-exp.war/WEB-INF/lib/jruby-stdlib-1.6.5.jar!/META-INF/jruby.home
--- Context Init Parameters:
com.sun.faces.injectionProvider = org.jboss.web.jsf.integration.injection.JBossInjectionProvider
jruby.compat.version = 1.9
public.root = /
rails.env = production
--- Backtrace
LoadError: No such file to load -- lib/mylib
...
Output of 'gem list':
$ gem list
*** LOCAL GEMS ***
actionmailer (3.1.1)
actionpack (3.1.1)
activemodel (3.1.1)
activerecord (3.1.1)
activeresource (3.1.1)
activesupport (3.1.1)
arel (2.2.1)
bouncy-castle-java (1.5.0146.1)
builder (3.0.0)
bundler (1.0.21)
capybara (1.1.2)
childprocess (0.2.3, 0.2.2)
ci_reporter (1.6.5)
coffee-rails (3.1.1)
coffee-script (2.2.0)
coffee-script-source (1.1.3)
cucumber (1.1.3)
cucumber-rails (1.2.0)
diff-lcs (1.1.3)
erubis (2.7.0)
execjs (1.2.9)
ffi (1.0.11 java)
gherkin (2.6.8 java)
haml (3.1.3)
haml-rails (0.3.4)
hike (1.2.1)
i18n (0.6.0)
jquery-rails (1.0.19, 1.0.18)
jruby-jars (1.6.5)
jruby-launcher (1.0.9 java)
jruby-openssl (0.7.4)
jruby-rack (1.0.10)
json (1.6.2, 1.6.1 java)
json_pure (1.6.2, 1.6.1)
mail (2.3.0)
mime-types (1.17.2)
multi_json (1.0.3)
nokogiri (1.5.0 java)
polyglot (0.3.3)
rack (1.3.5)
rack-cache (1.1)
rack-mount (0.8.3)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (3.1.1)
railties (3.1.1)
rake (0.9.2.2, 0.8.7)
rcov (0.9.11 java)
rdoc (3.11)
rspec (2.7.0)
rspec-core (2.7.1)
rspec-expectations (2.7.0)
rspec-mocks (2.7.0)
rspec-rails (2.7.0)
rubyzip (0.9.5, 0.9.4)
sass (3.1.10)
sass-rails (3.1.5)
selenium-webdriver (2.13.0)
spork (0.9.0.rc9)
sprockets (2.0.3)
term-ansicolor (1.0.7)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
tzinfo (0.3.31)
uglifier (1.1.0)
warbler (1.3.2)
xpath (0.1.4)
How are you requiring your jar.
if it's
require 'lib/myjar'
try changing it to
require 'myjar'
and see if that works
Release notes say that ruby-debug is installed by default. I'm using rvm. In my rails app I figured something as simple as script/server --debugger would suffice, but it complains that the ruby-debug gem isn't installed, suggests using gem install ruby-debug, which of course doesn't work (building native extensions) and is contrary to the docs anyway.
Just wondering if anyone's had any luck using the built in ruby-debug in jruby 1.5 and what one needs to do in order run jruby in debug mode.
Here's my output:
brad-robertsons-macbook-pro:trunk bradrobertson$ which ruby
/Users/bradrobertson/.rvm/rubies/jruby-1.5.1/bin/ruby
brad-robertsons-macbook-pro:trunk bradrobertson$ jruby --debug script/server --debugger
=> Booting WEBrick
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
You need to install ruby-debug to run the server in debugging mode. With gems, use 'gem install ruby-debug'
Hmm, it appears to work for me.
~/projects/jruby/yogi/test ➔ jruby --debug script/server --debugger
=> Booting Mongrel
=> Rails 2.3.5 application starting on http://0.0.0.0:3000
=> Debugger enabled
=> Call with -d to detach
=> Ctrl-C to shutdown server
app/views/test/_test2.html.erb:3
<% 6.times do -%>
(rdb:3) next
app/views/test/_test2.html.erb:3
<% 6.times do -%>
(rdb:3) step
app/views/test/_test2.html.erb:4
<%= render :partial => "test3.html.erb" %>
(rdb:3) step
/Users/headius/projects/jruby/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/string/output_safety.rb:34
result = concat_without_safety(other_or_fixnum)
Given the following _test_2.html partial:
<div >
<% debugger -%>
<% 6.times do -%>
<%= render :partial => "test3.html.erb" %>
<% end -%>
</div>
How did you get JRuby?
I have the same problems with the RVM + JRuby combination. See my post on this for a work-around: http://wordsanddeeds.posterous.com/debugging-with-rvm-jruby