Skip to content
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

serve doesn't seem to work... #81

Open
TinajaLabs opened this issue Sep 24, 2014 · 8 comments
Open

serve doesn't seem to work... #81

TinajaLabs opened this issue Sep 24, 2014 · 8 comments

Comments

@TinajaLabs
Copy link

Going through instructions and when I get to this point, after installing the serve gem, and executing this command:

$ serve .

...it chokes with the listing below. Tried it with 2.12, 2.1.0, 2.0.0. I've posted an issue on jlong/serve#118 repo but no response so far.

Might there be another another approach to setting up graphene charts that does not depend on serve? Or a way to fix what looks like some kind of dependency problem?

Thanks in advance,
Chris.

on RHEL 6.5

# serve .
/usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- i18n/core_ext/string/interpolate (LoadError)
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.19/lib/active_support/core_ext/string/interpolation.rb:2:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.19/lib/active_support/core_ext/string.rb:9:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.19/lib/active_support/core_ext.rb:2:in `block in <top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.19/lib/active_support/core_ext.rb:1:in `each'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.19/lib/active_support/core_ext.rb:1:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/activesupport-3.2.19/lib/active_support/all.rb:3:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/serve-1.5.2/lib/serve.rb:1:in `<top (required)>'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/rubies/ruby-2.0.0-p0/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/gems/serve-1.5.2/bin/serve:13:in `<top (required)>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/serve:23:in `load'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/serve:23:in `<main>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_executable_hooks:15:in `<main>'
@jondot
Copy link
Owner

jondot commented Sep 24, 2014

Hey, thanks for trying out Graphene :)
Looks like you have a gem dependency problem. it should be easily solved with just doing a

$ bundle exec serve .

which would isolate the gems and use only those you need.
This kind of troubleshooting should help you with other projects as well - if you get the same kind of log or weirdness.

@TinajaLabs
Copy link
Author

I must have really screwed up the ruby install on this rhel instance.

First I ran this as you suggested:

/opt/graphene/example # bundle exec serve .
Could not find coderay-1.0.9 in any of the sources
Run `bundle install` to install missing gems.

So I ran this (currently only user is root):

/opt/graphene/example # bundle install
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root
users on this machine.
Fetching gem metadata from https://rubygems.org/..........
Fetching https://github.com/jondot/guard-sprockets.git
Installing coderay 1.0.9
Installing coffee-script-source 1.2.0
Installing multi_json 1.0.4
Installing execjs 1.3.0
Installing coffee-script 2.2.0
Installing ffi 1.9.0
Installing formatador 0.2.4
Installing rb-fsevent 0.9.3
Installing rb-inotify 0.9.2
Installing rb-kqueue 0.2.0
Installing listen 1.2.2
Installing lumberjack 1.0.4
Installing method_source 0.8.2
Installing slop 3.4.6
Installing pry 0.9.12.2
Installing thor 0.18.1
Installing guard 1.8.2
Installing hike 1.2.3
Using rack 1.5.2
Installing tilt 1.4.1
Installing sprockets 2.10.0
Using guard-sprockets 0.2.0 from https://github.com/jondot/guard-sprockets.git (at master)
Installing sass 3.1.15
Installing uglifier 1.2.3
Using bundler 1.7.3
Your bundle is complete!
Use `bundle show [gemname]` to see where a bundled gem is installed.

I don't see serve in the list...?

Now when I run the command you suggested, it chokes.

/opt/graphene/example # bundle exec serve .
/usr/local/rvm/gems/ruby-2.0.0-p0@global/gems/bundler-1.7.3/lib/bundler/rubygems_integration.rb:256:in `block in replace_gem': serve is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/serve:22:in `<main>'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_executable_hooks:15:in `eval'
    from /usr/local/rvm/gems/ruby-2.0.0-p0/bin/ruby_executable_hooks:15:in `<main>'

@jondot
Copy link
Owner

jondot commented Sep 26, 2014

Interesting. do you have the serve gem installed?

@TinajaLabs
Copy link
Author

yes.

/opt/graphene # gem install serve
Successfully installed serve-1.5.2
Parsing documentation for serve-1.5.2
unable to convert "\x89" from ASCII-8BIT to UTF-8 for lib/serve/templates/default/public/images/serve-logo.png, skipping
1 gem installed

@TinajaLabs
Copy link
Author

Maybe this helps:

/opt/graphene # rvm list rubies

rvm rubies

=* ruby-2.0.0-p0 [ x86_64 ]
   ruby-2.0.0-p481 [ x86_64 ]
   ruby-2.1.0 [ x86_64 ]
   ruby-2.1.2 [ x86_64 ]
/opt/graphene # rvm gemset list_all

gemsets for ruby-2.1.2 (found in /usr/local/rvm/gems/ruby-2.1.2)
=> (default)
   global


gemsets for ruby-2.1.0 (found in /usr/local/rvm/gems/ruby-2.1.0)
=> (default)
   global


gemsets for ruby-2.0.0-p481 (found in /usr/local/rvm/gems/ruby-2.0.0-p481)
=> (default)
   global


gemsets for ruby-2.0.0-p0 (found in /usr/local/rvm/gems/ruby-2.0.0-p0)
=> (default)
   global

@voodoo
Copy link

voodoo commented Sep 27, 2014

Turns out, the problem was with the i18n gem. This fixed it for me.

gem uninstall i18n
gem install i18n -v 0.6.11

@TinajaLabs
Copy link
Author

Worked for me, too. Thanks.

Now onto the fun stuff; hooking our graphite data into graphene.

/opt/graphene/example # gem uninstall i18n

You have requested to uninstall the gem:
    i18n-0.7.0.beta1

activesupport-3.2.19 depends on i18n (>= 0.6.4, ~> 0.6)
serve-1.5.2 depends on i18n (>= 0)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Successfully uninstalled i18n-0.7.0.beta1
opt/graphene/example # gem install i18n -v 0.6.11
Fetching: i18n-0.6.11.gem (100%)
Successfully installed i18n-0.6.11
Parsing documentation for i18n-0.6.11
Installing ri documentation for i18n-0.6.11
1 gem installed

@elboletaire
Copy link

As this is a javascript project, why not try with the npmjs package serve?

npm install -g serve
serve -s example

Note that I've not tried this on my behalf, but it's something that shocked me from the readme.... an npm package telling me to install a ruby gem 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants