AST on Rails

Hi All!

Following code is working perfectly on Ruby IDE, can anyone tell me how
will it works on Ruby on Rails. Because when i run it using ruby on
rails, it is not displaying anything and also no errors. Even I have
properly include rubygems and ruby_parser. Even Rails server stops
working

<%
require "rubygems"
require "ruby_parser"

sexpfaulty1 = RubyParser.new.parse(File.read("faulty_0.rb"))

%>

<%= sexpfaulty1 %>

Hi All!

Following code is working perfectly on Ruby IDE, can anyone tell me how
will it works on Ruby on Rails. Because when i run it using ruby on
rails, it is not displaying anything and also no errors. Even I have
properly include rubygems and ruby_parser. Even Rails server stops
working

<%
require "rubygems"
require "ruby_parser"

sexpfaulty1 = RubyParser.new.parse(File.read("faulty_0.rb"))

%>

Why stick this in the view? Have you checked what the current
directory is when this executes

<%= sexpfaulty1 %>

You should escape this (with h) as if it contains invalid markup the
browser might get confused.

Fred