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

How to run cocoadocs-api locally? #27

Open
0xced opened this issue Feb 5, 2017 · 3 comments
Open

How to run cocoadocs-api locally? #27

0xced opened this issue Feb 5, 2017 · 3 comments

Comments

@0xced
Copy link

0xced commented Feb 5, 2017

I’m trying to run cocoadocs-api locally. Here’s what I did

  • Installed ruby 2.1.3 with rbenv
  • Installed Postgres
  • Created a new trunk_cocoapods_org_development database

When running the project I get the following error:

$ DATABASE_URL=postgres://localhost/trunk_cocoapods_org_development rake serve
bundle exec foreman start
10:22:28 web.1  | started with pid 42011
10:22:29 web.1  | Using rack adapter
10:22:29 web.1  | bundler: failed to load command: thin (~/.rbenv/versions/2.1.3/bin/thin)
10:22:29 web.1  | ArgumentError: invalid tuple number 0
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder/domain.rb:131:in `getvalue'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder/domain.rb:131:in `block in table_oid'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder/connection_pool.rb:20:in `block in with_connection'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/connection_pool-2.0.0/lib/connection_pool.rb:58:in `with'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder/connection_pool.rb:19:in `with_connection'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder/domain.rb:128:in `table_oid'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder/domain.rb:83:in `entity'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/domain.rb:25:in `block in <top (required)>'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder.rb:32:in `block in domain'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder.rb:32:in `tap'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/flounder-0.9.7/lib/flounder.rb:32:in `domain'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/domain.rb:22:in `<top (required)>'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/app.rb:12:in `require_relative'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/app.rb:12:in `<class:App>'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/app.rb:8:in `<top (required)>'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/config.ru:4:in `block in <main>'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `instance_eval'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/config.ru:1:in `new'
10:22:29 web.1  |   ~/Projects/CocoaPods/cocoadocs-api/config.ru:1:in `<main>'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `eval'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/lib/rack/adapter/loader.rb:33:in `load'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/lib/rack/adapter/loader.rb:42:in `for'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/lib/thin/controllers/controller.rb:170:in `load_adapter'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/lib/thin/controllers/controller.rb:74:in `start'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/lib/thin/runner.rb:199:in `run_command'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/lib/thin/runner.rb:155:in `run!'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/lib/ruby/gems/2.1.0/gems/thin-1.6.2/bin/thin:6:in `<top (required)>'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/bin/thin:23:in `load'
10:22:29 web.1  |   ~/.rbenv/versions/2.1.3/bin/thin:23:in `<top (required)>'
10:22:29 web.1  | exited with code 1
10:22:29 system | sending SIGTERM to all processes

What am I doing wrong?

@endocrimes
Copy link
Member

@0xced it looks like running the Docs API also requires running https://github.com/CocoaPods/Humus

@endocrimes
Copy link
Member

That said, that error doesn't look like it should be related

@orta
Copy link
Member

orta commented Feb 5, 2017

Yeah, you would need to run the migrations from humus before being able to start running the cocoadocs-api - I think the issue is likely due to a non-migrated db

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

3 participants