cloudhead / toto

the 10 second blog-engine for hackers
MIT License
1.49k stars 244 forks source link

a issue using thin with toto #134

Open luckypoem opened 11 years ago

luckypoem commented 11 years ago

hi.pls see below.how to fix the issue?

as3:~# cd toto-blog as3:~/toto-blog# ls articles config.ru public Rakefile README templates as3:~/toto-blog# thin start -R config.ru config.ru:2:in require': no such file to load -- toto (LoadError) from config.ru:2 from /usr/lib/ruby/1.8/rack/builder.rb:46:ininstance_eval' from /usr/lib/ruby/1.8/rack/builder.rb:46:in initialize' from config.ru:1:innew' from config.ru:1

kyuucr commented 10 years ago

Have you installed toto using gem? sudo gem install toto

luckypoem commented 10 years ago

hi. i used "thin" unsuccessfully,but i use "unicorn" successfully.

gem install unicorn

unicorn --port 23456

AloisMahdal commented 10 years ago

Hi, I have the same issue with toto on Debian Wheezy.

What I did was:

  1. sudo aptitude install rubygems (1.8.24-1)
  2. sudo aptitude install thin (1.3.1-3)
  3. sudo gem install toto (0.4.9)
  4. cloned dorothy (master 6b9b23f from May 14 2010), cd to the folder
  5. thin start -R config.ru from the dorothy root
aloism@azzgoat:~/relief(master *)$ thin start -R config.ru 
config.ru:2:in `require': no such file to load -- toto (LoadError)
        from config.ru:2
        from /usr/lib/ruby/vendor_ruby/rack/builder.rb:51:in `instance_eval'
        from /usr/lib/ruby/vendor_ruby/rack/builder.rb:51:in `initialize'
        from config.ru:1:in `new'
        from config.ru:1
aloism@azzgoat:~/relief(master *)$ 
kakubei commented 10 years ago

I had the same issue on Mavericks on a Mac, had to use Puma instead, there was not way to launch the app with Thin because it kept looking for the Toto gem in the System's defalt ruby path where it was't installed. My config.ru file looks like this:

#!/usr/bin/env rackup 
#\ -p 8000 # run on port 8000
# encoding: utf-8

require 'toto'
...

I also changed the project to use Bundler with a Gemfile.