Skip to content

Instantly share code, notes, and snippets.

@WaYdotNET
Created February 25, 2011 16:09
Show Gist options
  • Save WaYdotNET/844007 to your computer and use it in GitHub Desktop.
Save WaYdotNET/844007 to your computer and use it in GitHub Desktop.
require 'rubygems' if RUBY_VERSION < '1.9'
#require 'sinatra'
load 'sample.rb'
run SimpleNavigationApp
Boot Error
Something went wrong while loading config.ru
TypeError: can't convert nil into String
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/simple-navigation-3.2.0/lib/simple_navigation.rb:70:in `join'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/simple-navigation-3.2.0/lib/simple_navigation.rb:70:in `default_config_file_path'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/simple-navigation-3.2.0/lib/simple_navigation.rb:41:in `set_env'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/simple-navigation-3.2.0/lib/simple_navigation/adapters/sinatra.rb:8:in `register'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/sinatra-simple-navigation-3.2.0/lib/sinatra/simple_navigation.rb:11
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/sinatra-simple-navigation-3.2.0/lib/sinatra/simple-navigation.rb:1
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `gem_original_require'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:32:in `require'
./sample.rb:5
config.ru:3:in `load'
config.ru:3:in `inner_app'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.1/lib/rack/builder.rb:46:in `initialize'
config.ru:1:in `new'
config.ru:1:in `inner_app'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/lib/shotgun/loader.rb:102:in `eval'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/lib/shotgun/loader.rb:112:in `inner_app'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/lib/shotgun/loader.rb:102:in `assemble_app'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/lib/shotgun/loader.rb:86:in `proceed_as_child'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/lib/shotgun/loader.rb:31:in `call!'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/lib/shotgun/loader.rb:18:in `call'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/lib/shotgun/favicon.rb:12:in `call'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.1/lib/rack/builder.rb:77:in `call'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.1/lib/rack/content_length.rb:13:in `call'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.1/lib/rack/handler/webrick.rb:52:in `service'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:162:in `start'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:95:in `start'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:92:in `each'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:92:in `start'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:23:in `start'
/home/waydotnet/.rvm/rubies/ruby-1.8.7-p334/lib/ruby/1.8/webrick/server.rb:82:in `start'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/rack-1.2.1/lib/rack/handler/webrick.rb:13:in `run'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/gems/shotgun-0.9/bin/shotgun:156
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/bin/shotgun:19:in `load'
/home/waydotnet/.rvm/gems/ruby-1.8.7-p334/bin/shotgun:19
require 'sinatra/base'
require 'sinatra/simple-navigation'
class SimpleNavigationApp < Sinatra::Base
register Sinatra::SimpleNavigation
get '/*' do
"Hello World!"
end
end
@WaYdotNET
Copy link
Author

if use "sinatra" work well
but if don't use "sinatra" not work

@WaYdotNET
Copy link
Author

Welcome to IRB. You are using ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-linux]. Have fun ;)

require 'sinatra/base' #=> true

Sinatra::Application.root= File.expand_path "../", FILE #=> "/mnt/virtual"

require 'sinatra/simple-navigation' #=> true

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