ginatra
ginatra copied to clipboard
Ginatra is NOT running
Hey there,
I just installed the Ginatra 4.0.2 app. I changed the config.yml in the root folder and when I type
sudo ginatra run
I get
checking for git... yes
Ginatra runs on xxx.xxx.xxx.xxx:9797
But when I use
sudo ginatra status
I get back
Ginatra is NOT running
What am I doing wrong? My config file looks like:
git_dirs:
- /opt/git/*
description: "My Git Repositories"
port: 9797
host: xxx.xxx.xxx.xxx
prefix: "/"
git_clone_enable?: true
My app is installed under /usr/local/lib/ruby/gems/2.2.0/gems/ginatra-4.0.2 should this be the prefix?
EDIT: I got the server running atm but I'm getting a 500 interal server error. I double checked my git_dirs and it seems ok... it's still on /opt/git/* and I've got only one repo on my server which is: /opt/git/c-programming.git. I've played a little with the git_dirs parameter and even if I complete change it to some random location ginatra still says: "checking for git...yes"
checking for git...yes
message just means that you have git
executable installed.
Does the server work if you point git_dirs
to a random empty directory?
Ok I misunderstood the message, I'm sorry. I just made an empty directory in my home folder and pointed the git_dirs to that dummy folder. When I used
sudo ginatra status
I got
Ginatra is running.. (pid:2142)
When I point it to my real git repository I get the same message and I still get a 500 error when I got to localhost:9797 in my webbrowser. And was my prefix path ok?
The prefix setting is used when running in a subdirectory, so I think it's ok.
Could you test with the latest version: 4.1.0? Also I don't recommend running ginatra as a root.
I upgraded but it didn't change anything. Could it be the problem that I'm trying to run it on a raspberry pi with Raspbian? I know I shouldn't be running it as root, but it's just a hobby project I'm working on. I kind of screwed up the ruby installation I guess, cause I can only update and run gems as sudo... I might just give up on this project! I really like the way it looks, but I think I shouldn't be trying to install it on my RPi. Should I close the issue?
Could it be the problem that I'm trying to run it on a raspberry pi with Raspbian?
No, it should work perfectly.
Could you start it with this command: RACK_ENV=development ginatra run
?
That will enable verbose mode.
I've seen that comment a lot, but it doesn't do anything for me...I might consider reinstalling Raspbian and trying it again. I think I've broken something lol
Strange. The index page just lists directory names, in theory it shouldn't 500.
Does it display the repo page localhost:9797/repo-name
?
I had the same issues pimteslaa. I first tried the gem install, then reverted to checkout and bundle it. After the server was running (bundle exec bin/ginatra run) i could not reference outside of the dir due to bundler which resulted in 500 errors. I soft linked in the ./repos directory (as defined in the README within that dir) so the app can see it since it is jailed at that point... of course if you aren't using bundler, ignore this message :)
I am getting the same result as above, running ginatra run
results in:
checking for git... yes Ginatra runs on localhost:9797
After I get this a ginatra status returns: ``Ginatra is NOT running`` Note: ps also verifies it is not running. If I run ``/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require': cannot load such file -- better_errors (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:29:in
block in class:App'
from /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1410:in configure' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:27:in
class:App'
from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:15:in <module:Ginatra>' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:12:in
<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in require' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in
rescue in require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in require' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/config.ru:1:in
block in instance_eval' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:55:in
initialize'
from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/config.ru:in new' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/config.ru:in
eval' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:49:in
new_from_string'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:40:in parse_file' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:299:in
build_app_and_options_from_config'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:208:in app' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:336:in
wrapped_app'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:272:in start' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:147:in
start'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/bin/rackup:4:in <top (required)>' from /usr/local/bin/rackup:23:in
load'
from /usr/local/bin/rackup:23:in `
My Environment
- debian wheezy
- ruby 1.9
- ginatra 4.1.0
The issue with better_errors requiring ruby 2.0.0 was my mistake, I was installing the latest better_errors. When installing better_errors -v 1.1.0 (as the app requires) succeeds and solves the above dump; however, it leaves me with the following dump:
RACK_ENV=development ginatra run /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in
require': cannot load such file -- sinatra/reloader (LoadError)
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in require' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:34:in
block in class:App'
from /var/lib/gems/1.9.1/gems/sinatra-1.4.6/lib/sinatra/base.rb:1410:in configure' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:27:in
class:App'
from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:15:in <module:Ginatra>' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/lib/ginatra.rb:12:in
<top (required)>'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in require' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:60:in
rescue in require'
from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:35:in require' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/config.ru:1:in
block in instance_eval' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:55:in
initialize'
from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/config.ru:in new' from /var/lib/gems/1.9.1/gems/ginatra-4.1.0/config.ru:in
eval' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:49:in
new_from_string'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:40:in parse_file' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:299:in
build_app_and_options_from_config'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:208:in app' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:336:in
wrapped_app'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:272:in start' from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/server.rb:147:in
start'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/bin/rackup:4:in <top (required)>' from /usr/local/bin/rackup:23:in
load'
from /usr/local/bin/rackup:23:in <main>' Ginatra runs on localhost:9797
Sorry for all of the updates but due to the above roadblock, I switched to use the app (with bundler) and ginatra starts up without an issue. If I have time later I'll pull and see if I can figure out the gem problem.