New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadError racc/parser.rb #2632

Closed
mrrooijen opened this Issue Oct 3, 2013 · 7 comments

Comments

Projects
None yet
5 participants
@mrrooijen

mrrooijen commented Oct 3, 2013

rails console

An exception occurred running bin/rails:

    no such file to load -- racc/parser.rb (LoadError)

Backtrace:

                                                        Rubinius::CodeLoader#load_error at kernel/common/code_loader.rb:436
                                              Rubinius::CodeLoader#resolve_require_path at kernel/common/code_loader.rb:423
                                                    { } in Rubinius::CodeLoader#require at kernel/common/code_loader.rb:103
                                                                   Rubinius.synchronize at kernel/bootstrap/rubinius.rb:147
                                                           Rubinius::CodeLoader#require at kernel/common/code_loader.rb:102
                                                           Rubinius::CodeLoader.require at kernel/common/code_loader.rb:237
                                                                 Kernel(Object)#require at kernel/common/kernel.rb:685
                           { } in ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                          ActiveSupport::Dependencies::Loadable(Object)#load_dependency at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
                                  ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                                                                      Object#__script__ at /Users/Michael/.gem/rbx/2.1.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/parser.rb:7
                                                           Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                                                                 Kernel(Object)#require at kernel/common/kernel.rb:685
                           { } in ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                          ActiveSupport::Dependencies::Loadable(Object)#load_dependency at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
                                  ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                                                                      Object#__script__ at /Users/Michael/.gem/rbx/2.1.0/gems/actionpack-4.0.0/lib/action_dispatch/journey/router.rb:8
                                                           Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                                                                 Kernel(Object)#require at kernel/common/kernel.rb:685
                           { } in ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                          ActiveSupport::Dependencies::Loadable(Object)#load_dependency at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
                                  ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                                                                      Object#__script__ at /Users/Michael/.gem/rbx/2.1.0/gems/actionpack-4.0.0/lib/action_dispatch/journey.rb:1
                                                           Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                                                                 Kernel(Object)#require at kernel/common/kernel.rb:685
                           { } in ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                          ActiveSupport::Dependencies::Loadable(Object)#load_dependency at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:213
                                  ActiveSupport::Dependencies::Loadable(Object)#require at /Users/Michael/.gem/rbx/2.1.0/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228
                                                                      Object#__script__ at /Users/Michael/.gem/rbx/2.1.0/gems/actionpack-4.0.0/lib/action_dispatch/routing/route_set.rb:1
                                                           Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                                                                       Autoload#resolve at kernel/common/autoload.rb:55
                                           Rails::Engine(SampleApp::Application)#routes at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/engine.rb:524
                                       { } in Object(SampleApp::Application)#__script__ at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/engine.rb:571
                                      BasicObject(SampleApp::Application)#instance_exec at kernel/common/eval.rb:101
                                                  Rails::Initializable::Initializer#run at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/initializable.rb:30
                   { } in Rails::Initializable(SampleApp::Application)#run_initializers at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/initializable.rb:55
                              { } in TSort(Rails::Initializable::Collection)#tsort_each at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:150
       { } in TSort(Rails::Initializable::Collection)#each_strongly_connected_component at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:183
  { } in TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:210 (3 times)
         TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:219
  { } in TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:209
                                                                             Array#each at kernel/bootstrap/array.rb:66
                                      Rails::Initializable::Collection#tsort_each_child at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/initializable.rb:44
         TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:203
  { } in TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:209
                                                                             Array#each at kernel/bootstrap/array.rb:66
                                      Rails::Initializable::Collection#tsort_each_child at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/initializable.rb:44
         TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:203
  { } in TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:209
                                                                             Array#each at kernel/bootstrap/array.rb:66
                                      Rails::Initializable::Collection#tsort_each_child at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/initializable.rb:44
         TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:203
  { } in TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:209
                                                                             Array#each at kernel/bootstrap/array.rb:66
                                      Rails::Initializable::Collection#tsort_each_child at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/initializable.rb:44
         TSort(Rails::Initializable::Collection)#each_strongly_connected_component_from at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:203
       { } in TSort(Rails::Initializable::Collection)#each_strongly_connected_component at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:182
                         Array(Rails::Initializable::Collection)#tsort_each_node (each) at kernel/bootstrap/array.rb:66
              TSort(Rails::Initializable::Collection)#each_strongly_connected_component at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:180
                                     TSort(Rails::Initializable::Collection)#tsort_each at /Users/Michael/.rubies/rbx/gems/gems/rubysl-tsort-2.0.1/lib/rubysl/tsort/tsort.rb:148
                          Rails::Initializable(SampleApp::Application)#run_initializers at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/initializable.rb:54
                                 Rails::Application(SampleApp::Application)#initialize! at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/application.rb:215
         Rails::Railtie::Configurable::ClassMethods(Class)#initialize! (method_missing) at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/railtie/configurable.rb:30
                                                                      Object#__script__ at config/environment.rb:5
                                                           Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                                                 Kernel(SampleApp::Application)#require at kernel/common/kernel.rb:685
                        Rails::Application(SampleApp::Application)#require_environment! at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/application.rb:189
                                                                      Object#__script__ at /Users/Michael/.gem/rbx/2.1.0/gems/railties-4.0.0/lib/rails/commands.rb:63
                                                           Rubinius::CodeLoader.require at kernel/common/code_loader.rb:243
                                                                 Kernel(Object)#require at kernel/common/kernel.rb:685
                                                                      Object#__script__ at bin/rails:4
                                                       Rubinius::CodeLoader#load_script at kernel/delta/code_loader.rb:66
                                                       Rubinius::CodeLoader.load_script at kernel/delta/code_loader.rb:182
                                                                Rubinius::Loader#script at kernel/loader.rb:644
                                                                  Rubinius::Loader#main at kernel/loader.rb:825

Saw this in my Rails 4 app. Generated a new sample (blank) Rails app to see if the issue persists, and it does.

Steps to reproduce:

rails new sample_app
cd sample_app
echo "gem 'rubysl'" >> Gemfile
bundle
rails console

Environment:

ruby -v
rubinius 2.0.0n276 (2.1.0 d82037f8 2013-10-03 JI) [x86_64-darwin12.5.0]

rails -v
Rails 4.0.0

bundle list
Gems included by the bundle:
  * actionmailer (4.0.0)
  * actionpack (4.0.0)
  * activemodel (4.0.0)
  * activerecord (4.0.0)
  * activerecord-deprecated_finders (1.0.3)
  * activesupport (4.0.0)
  * arel (4.0.0)
  * atomic (1.1.14)
  * builder (3.1.4)
  * bundler (1.3.5)
  * coffee-rails (4.0.0)
  * coffee-script (2.2.0)
  * coffee-script-source (1.6.3)
  * erubis (2.7.0)
  * execjs (2.0.2)
  * ffi2-generators (0.1.1)
  * hike (1.2.3)
  * i18n (0.6.5)
  * jbuilder (1.5.1)
  * jquery-rails (3.0.4)
  * json (1.8.0)
  * mail (2.5.4)
  * mime-types (1.25)
  * minitest (4.7.5)
  * multi_json (1.8.0)
  * polyglot (0.3.3)
  * psych (2.0.1)
  * rack (1.5.2)
  * rack-test (0.6.2)
  * rails (4.0.0)
  * railties (4.0.0)
  * rake (10.1.0)
  * rdoc (3.12.2)
  * rubysl (2.0.6)
  * rubysl-abbrev (2.0.2)
  * rubysl-base64 (2.0.0)
  * rubysl-benchmark (2.0.0)
  * rubysl-bigdecimal (2.0.2)
  * rubysl-cgi (2.0.0)
  * rubysl-cgi-session (2.0.0)
  * rubysl-cmath (2.0.0)
  * rubysl-complex (2.0.0)
  * rubysl-continuation (2.0.0)
  * rubysl-coverage (2.0.0)
  * rubysl-csv (2.0.1)
  * rubysl-curses (2.0.0)
  * rubysl-date (2.0.2)
  * rubysl-delegate (2.0.0)
  * rubysl-digest (2.0.2)
  * rubysl-drb (2.0.1)
  * rubysl-e2mmap (2.0.0)
  * rubysl-english (2.0.0)
  * rubysl-enumerator (2.0.0)
  * rubysl-erb (2.0.0)
  * rubysl-etc (2.0.2)
  * rubysl-expect (2.0.0)
  * rubysl-fcntl (2.0.4)
  * rubysl-fiber (2.0.0)
  * rubysl-fileutils (2.0.2)
  * rubysl-find (2.0.0)
  * rubysl-forwardable (2.0.0)
  * rubysl-getoptlong (2.0.0)
  * rubysl-gserver (2.0.0)
  * rubysl-io-console (2.0.0)
  * rubysl-io-nonblock (2.0.0)
  * rubysl-io-wait (2.0.0)
  * rubysl-ipaddr (2.0.0)
  * rubysl-irb (2.0.3)
  * rubysl-json (2.0.2)
  * rubysl-logger (2.0.0)
  * rubysl-mathn (2.0.0)
  * rubysl-matrix (2.1.0)
  * rubysl-mkmf (2.0.1)
  * rubysl-monitor (2.0.0)
  * rubysl-mutex_m (2.0.0)
  * rubysl-net-ftp (2.0.1)
  * rubysl-net-http (2.0.4)
  * rubysl-net-imap (2.0.1)
  * rubysl-net-pop (2.0.1)
  * rubysl-net-protocol (2.0.1)
  * rubysl-net-smtp (2.0.1)
  * rubysl-net-telnet (2.0.0)
  * rubysl-nkf (2.0.0)
  * rubysl-observer (2.0.0)
  * rubysl-open-uri (2.0.0)
  * rubysl-open3 (2.0.0)
  * rubysl-openssl (2.0.0)
  * rubysl-optparse (2.0.1)
  * rubysl-ostruct (2.0.4)
  * rubysl-pathname (2.0.0)
  * rubysl-prettyprint (2.0.1)
  * rubysl-prime (2.0.0)
  * rubysl-profile (2.0.0)
  * rubysl-profiler (2.0.0)
  * rubysl-pstore (2.0.0)
  * rubysl-pty (2.0.0)
  * rubysl-rational (2.0.1)
  * rubysl-readline (2.0.2)
  * rubysl-resolv (2.0.0)
  * rubysl-rexml (2.0.1)
  * rubysl-rinda (2.0.0)
  * rubysl-ripper (2.0.0)
  * rubysl-rss (2.0.0)
  * rubysl-scanf (2.0.0)
  * rubysl-securerandom (2.0.0)
  * rubysl-set (2.0.1)
  * rubysl-shellwords (2.0.0)
  * rubysl-singleton (2.0.0)
  * rubysl-socket (2.0.0)
  * rubysl-stringio (2.0.0)
  * rubysl-strscan (2.0.0)
  * rubysl-syslog (2.0.1)
  * rubysl-tempfile (2.0.0)
  * rubysl-test-unit (2.0.1)
  * rubysl-thread (2.0.2)
  * rubysl-thwait (2.0.0)
  * rubysl-time (2.0.0)
  * rubysl-timeout (2.0.0)
  * rubysl-tmpdir (2.0.0)
  * rubysl-tracer (2.0.0)
  * rubysl-tsort (2.0.1)
  * rubysl-un (2.0.0)
  * rubysl-uri (2.0.0)
  * rubysl-weakref (2.0.0)
  * rubysl-webrick (2.0.0)
  * rubysl-xmlrpc (2.0.0)
  * rubysl-yaml (2.0.0)
  * rubysl-zlib (2.0.0)
  * sass (3.2.11)
  * sass-rails (4.0.0)
  * sdoc (0.3.20)
  * sprockets (2.10.0)
  * sprockets-rails (2.0.0)
  * sqlite3 (1.3.8)
  * thor (0.18.1)
  * thread_safe (0.1.3)
  * tilt (1.4.1)
  * treetop (1.4.15)
  * turbolinks (1.3.0)
  * tzinfo (0.3.37)
  * uglifier (2.2.1)
@razielgn

This comment has been minimized.

Contributor

razielgn commented Oct 3, 2013

Getting the same from Nokogiri. Racc::Parser (racc/parser.rb in stdlib) didn't get bundled as a gem as far as I can tell.

@YorickPeterse

This comment has been minimized.

Member

YorickPeterse commented Oct 3, 2013

Same issue here, confirmed with @brixen that racc is currently not bundled, nor is there a rubysl-racc at this point.

@brixen

This comment has been minimized.

Member

brixen commented Oct 3, 2013

Just added the existing racc 1.4.9 gem to rubysl and push rubysl-2.0.7.

Note that racc 1.4.9 has atrocious performance on Rubinius and was released a year ago. So, perhaps you can convince @tenderlove to release a new version.

@brixen brixen closed this Oct 3, 2013

@brianhempel

This comment has been minimized.

brianhempel commented Oct 23, 2013

This problem surfaces again after rubysl/rubysl@1c72361

@brixen

This comment has been minimized.

Member

brixen commented Oct 23, 2013

@brianhempel you'll need to add gem "racc" to your Gemfile.

Since gems like racc, psych, minitest are not controlled by rubysl, we can't ensure consistent dependency specification. Furthermore there are issues with e.g. psych, which requires a library to link to which may not be installed and which is specially handled by Heroku.

The separation of racc, psych, and minitest into gems predates rubysl but addresses many of the same issues, particularly getting updates to users sooner than MRI has a release. While it is potentially a bit painful to specify these dependencies in a Gemfile, that's typically a one-time task. The direction is clearly toward more gems, not less, and rubysl merely pushes the bar much further than anything previous, but not in a fundamentally different way.

@brianhempel

This comment has been minimized.

brianhempel commented Oct 24, 2013

@brixen Thanks for the detailed rational, and thanks for all your work on RBX and for trying to push Ruby forward.

The counterarguments are:

  1. I was expecting a gem called "rubysl" to provide the entire standard library.
  2. At present, there is no clear documentation of what rubysl is missing and how to deal with it. Rubinius kindly provides a message if you try to load a missing rubysl gem, but that message is wrong for racc. (see #2725 (comment)) As a 2-year Rubyist I had no idea whether racc was part of the standard library or not. I had to google the error. This all feels like an avoidable on-boarding problem for those people who just want to try out their Rails apps on RBX.

So, hopefully, more documentation is sufficient to not have people give up on RBX early.

@brixen

This comment has been minimized.

Member

brixen commented Oct 24, 2013

@brianhempel thanks for the feedback. You make two important points: 1) many Ruby developers have no idea what is even in the "standard" library; and 2) Rubinius has to do more to help people trying out their apps.

The solution to 1) is not to hide more stuff. The Ruby standard library is a complete mess and I will continue pushing that pain forward to force the issues to be addressed.

The solution to 2) is more difficult. It's going to require some clear documentation and a bunch of repetition. What I won't be doing is trying to hide the pain instead of removing the problem.

I added the standard lib stubs to attempt to give a more complete error message, but based on what I've seen, the verdict is still out on whether it helps. More effort to inform people may be better than yet another bandaid on the complete mess that is Ruby standard lib + rubygems + bundler + RVM gemsets + unknown other levels of hacks. It's really frustrating for trying to provide better solutions in Rubinius and I'm sure it's frustrating for people just trying out their apps.

Right now I'm trying to address issues with psych not building correctly, for example, even when someone has libyaml installed via apt on Ubuntu 12.04. I can't see any solution here where Rubinius tries to "fix" all this broken stuff. So, I'm going to remove any gem not explicitly part of rubysl so that solutions are not special-cased (i.e. psych is just a gem, installed by rubygems; it should work or not in that context, period). I'll work on better ways to inform people how to get help or debug the problems they encounter.

coffeejunk added a commit to coffeejunk/rouge that referenced this issue Nov 26, 2013

Add `racc` as dependency
Rubinius requires the explicit dependency on 'racc'.
(rubinius/rubinius#2632 (comment))

flavorjones added a commit to flavorjones/loofah that referenced this issue Jan 28, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment