ruhoh / blog

ruhoh blog base scaffolding
43 stars 14 forks source link

Error running rackup with cygwin Ruby 1.9.3 #6

Open marcel-valdez opened 11 years ago

marcel-valdez commented 11 years ago

I got this error when running rackup:

$ bundle exec rackup -p 9292
/usr/lib/ruby/gems/1.9.1/bundler/gems/ruhoh.rb-910e74a82e52/lib/ruhoh.rb:7:in `require': cannot load such file -- json (LoadError)
        from /usr/lib/ruby/gems/1.9.1/bundler/gems/ruhoh.rb-910e74a82e52/lib/ruhoh.rb:7:in `<top (required)>'
        from /cygdrive/d/proyects/marcel-valdez.ruhoh.com/config.ru:2:in `require'
        from /cygdrive/d/proyects/marcel-valdez.ruhoh.com/config.ru:2:in `block in <main>'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/builder.rb:51:in `instance_eval'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/builder.rb:51:in `initialize'
        from /cygdrive/d/proyects/marcel-valdez.ruhoh.com/config.ru:in `new'
        from /cygdrive/d/proyects/marcel-valdez.ruhoh.com/config.ru:in `<main>'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/builder.rb:40:in `eval'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/builder.rb:40:in `parse_file'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/server.rb:200:in `app'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/server.rb:304:in `wrapped_app'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/server.rb:254:in `start'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/lib/rack/server.rb:137:in `start'
        from /usr/lib/ruby/gems/1.9.1/gems/rack-1.4.3/bin/rackup:4:in `<top (required)>'
        from /usr/bin/rackup:23:in `load'
        from /usr/bin/rackup:23:in `<main>'

I did 2 things: 1st. I tried running

gem install json

and then I ran the same command, but I got the same error.

2nd. I added to the Gemfile

gem 'json' 

and this time everything ran correctly.

BurntBrunch commented 11 years ago

Same here. I also needed to add 'json_pure' to the Gemfile to get it to install.

dannystaple commented 9 years ago

Adding json_pure to gemfile worked. can the documentation at http://ruhoh.com/docs/2/ reflect this requirement please?