Harish
Harish

Reputation: 131

Compiled Jruby application Instance variable error

How do I use instance variable in jruby compiled application?

Here is where the instace variable is used

def index
  @samaple = ["It's works"]
  render json: @samaple
end

It's shows the following error when deployed:

Internal Server Error (500)
Request Method:     GET
Request URL:    http://localhost:8080/blog1/

/opt/tomcat/webapps/unbxd_jruby/WEB-INF/app/controllers/webapp/WEB-INF/app/controllers/home_controller.class is not compiled Ruby; use java_import to load normal classes...

The compiled code for jruby application showing error where the instace variables are used

Upvotes: 2

Views: 30

Answers (0)

Related Questions