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

Ginatra is NOT running #40

Open
pimts opened this issue Apr 16, 2015 · 11 comments
Open

Ginatra is NOT running #40

pimts opened this issue Apr 16, 2015 · 11 comments

Comments

@pimts
Copy link

pimts commented Apr 16, 2015

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"

@NARKOZ
Copy link
Owner

NARKOZ commented Apr 18, 2015

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?

@pimts
Copy link
Author

pimts commented Apr 18, 2015

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?

@NARKOZ
Copy link
Owner

NARKOZ commented Apr 19, 2015

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.

@pimts
Copy link
Author

pimts commented Apr 19, 2015

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?

@NARKOZ
Copy link
Owner

NARKOZ commented Apr 19, 2015

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.

@pimts
Copy link
Author

pimts commented Apr 19, 2015

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

@NARKOZ
Copy link
Owner

NARKOZ commented Apr 21, 2015

Strange. The index page just lists directory names, in theory it shouldn't 500.
Does it display the repo page localhost:9797/repo-name?

@ev0ldave
Copy link

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 :)

@dradux
Copy link

dradux commented Sep 24, 2015

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

'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:55: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 '
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:49: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 `'
Ginatra runs on localhost:9797``
If I try to gem install better_errors I get an error saying better_errors requires Ruby version >= 2.0.0
edit: This is odd as better_errors 1.1.0 only requires ruby1.9.2 (https://github.com/charliesome/better_errors/blob/v1.1.0/better_errors.gemspec)

My Environment

  • debian wheezy
  • ruby 1.9
  • ginatra 4.1.0

@dradux
Copy link

dradux commented Sep 24, 2015

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

'
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:55: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 '
from /var/lib/gems/1.9.1/gems/rack-1.6.4/lib/rack/builder.rb:49: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

@dradux
Copy link

dradux commented Sep 24, 2015

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.

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