hsgubert / cassandra_migrations

Cassandra Migrations is a Cassandra database schema migration library for Rails applications.
MIT License
45 stars 43 forks source link

rails g cassandra_migrations create_sample_tbl hangs #79

Open soonya opened 8 years ago

soonya commented 8 years ago

Facing an issue where the rails generation of the create table script does not work. Cassandra is running. The rails generation ruby process has an established connection and just stays there. Using the default datastax 3.4 cassandra config. Using the default cassandra.yml for cassandra_migrations.

Stack trace on interruption is: soonya@localhost:/var/www/myapp$ rails generate cassandra_migration create_sample_tbl ^C/home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/ione-1.2.3/lib/ione/future.rb:704:in pop': Interrupt from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/ione-1.2.3/lib/ione/future.rb:704:invalue' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cql-rb-2.0.0/lib/cql/client/client.rb:523:in block in connect' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cql-rb-2.0.0/lib/cql/client.rb:60:insynchronous_backtrace' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cql-rb-2.0.0/lib/cql/client/client.rb:523:in connect' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cql-rb-2.0.0/lib/cql/client.rb:132:inconnect' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cassandra_migrations-0.1.0/lib/cassandra_migrations/cassandra.rb:71:in connect_to_server' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cassandra_migrations-0.1.0/lib/cassandra_migrations/cassandra.rb:49:inuse' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cassandra_migrations-0.1.0/lib/cassandra_migrations/cassandra.rb:19:in start!' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cassandra_migrations-0.1.0/lib/cassandra_migrations/railtie/initializer.rb:27:inmodule:CassandraMigrations' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cassandra_migrations-0.1.0/lib/cassandra_migrations/railtie/initializer.rb:12:in <top (required)>' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:inrequire' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in block in require' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:inload_dependency' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in require' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/cassandra_migrations-0.1.0/lib/cassandra_migrations/railtie.rb:6:inblock in class:Railtie' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/initializable.rb:30:in instance_exec' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/initializable.rb:30:inrun' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/initializable.rb:55:in block in run_initializers' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:226:inblock in tsort_each' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:348:in block (2 levels) in each_strongly_connected_component' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:429:ineach_strongly_connected_component_from' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:347:in block in each_strongly_connected_component' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:ineach' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:in call' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:345:ineach_strongly_connected_component' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:224:in tsort_each' from /home/soonya/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/tsort.rb:203:intsort_each' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/initializable.rb:54:in run_initializers' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/application.rb:352:ininitialize!' from /var/www/myapp/config/environment.rb:5:in <top (required)>' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:inrequire' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in block in require' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:240:inload_dependency' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/activesupport-4.2.1/lib/active_support/dependencies.rb:274:in require' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/application.rb:328:inrequire_environment!' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:142:in require_application_and_environment!' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:128:ingenerate_or_destroy' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:50:in generate' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/commands/commands_tasks.rb:39:inrun_command!' from /home/soonya/.rvm/gems/ruby-2.2.1@rails-4.2/gems/railties-4.2.1/lib/rails/commands.rb:17:in <top (required)>' from bin/rails:4:inrequire' from bin/rails:4:in `

'

bsbodden commented 8 years ago

@soonya Could you put a small sample together? Also, can you list you Cassandra version, OS, Gemfile, etc. Thanks

soonya commented 8 years ago

` uname -a

Linux localhost 3.13.0-55-generic #94-Ubuntu SMP Thu Jun 18 00:27:10 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

ruby --version

ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-linux]

cat os-release NAME="Ubuntu" VERSION="14.04.2 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.2 LTS" VERSION_ID="14.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/"

BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

Gemfile

source 'https://rubygems.org'

Bundle edge Rails instead: gem 'rails', github: 'rails/rails'

gem 'rails', '4.2.1'

Use mysql as the database for Active Record

gem 'mysql2'

Use SCSS for stylesheets

gem 'sass-rails', '~> 5.0'

Use Uglifier as compressor for JavaScript assets

gem 'uglifier', '>= 1.3.0'

Use CoffeeScript for .coffee assets and views

gem 'coffee-rails', '~> 4.1.0'

See https://github.com/rails/execjs#readme for more supported runtimes

gem 'therubyracer', platforms: :ruby

gem 'pluck_to_hash'

Use jquery as the JavaScript library

gem 'jquery-rails'

Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks

gem 'turbolinks'

Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder

gem 'jbuilder', '~> 2.0'

bundle exec rake doc:rails generates the API under doc/api.

gem 'sdoc', '~> 0.4.0', group: :doc

Use ActiveModel has_secure_password

gem 'bcrypt', '~> 3.1.7'

Use Unicorn as the app server

gem 'unicorn'

Use Capistrano for deployment

gem 'capistrano-rails', group: :development gem 'capistrano-passenger', group: :development gem 'capistrano-rvm', group: :development group :development, :test do

Use Rspec for behaviour driven development

gem 'rspec-rails', '~> 3.0'

Use this gem for api documentaition as you write tests

gem 'rspec_api_documentation'

Use factory_girl instead of fixtures

gem 'factory_girl_rails'

Use database-cleaner to clean your suite on every test request

gem 'database_cleaner' gem 'faker'

Use rspec-json_expectations to test Json response body.

gem 'rspec-json_expectations'

Call 'byebug' anywhere in the code to stop execution and get a debugger console

gem 'byebug'

Use rails-erd to generate entity relationship diagram from you active models

gem 'rails-erd'

Access an IRB console on exception pages or by using <%= console %> in views

gem 'web-console', '~> 2.0'

Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring

gem 'spring'

Use this gem to generate statemachine graphs.

gem 'ruby-graphviz' gem 'railroady' gem 'redcarpet', '~> 3.1.2' end

Use devise for registering and authenticating app users.

gem 'devise'

Use omniauth to sign up users from third party applications.

gem 'omniauth' gem 'omniauth-facebook' gem 'omniauth-google-oauth2' gem 'omniauth-windowslive' gem 'omniauth-twitter' gem 'omniauth-linkedin-oauth2'

Use doorkeeper for OAuth 2.0 implementation in ruby.

gem 'doorkeeper', '~> 2.1.4'

Use virtus for Ruby PORO objects.

gem 'virtus'

Use redis-rails for using redis as your cache store

gem 'redis-rails' gem 'redis-objects'

Use the connection_pool for database connection pool size and timeout

gem 'connection_pool'

Use state_machine gem for your workflows.

gem 'state_machine', git: 'https://github.com/seuros/state_machine.git'

Use Grape for your REST API

gem 'grape' gem "hashie-forbidden_attributes"

Use wine_bouncer for integrating Doorkeeper with Grape

gem 'wine_bouncer', ('~> 0.5.0')

Use grape-cancan for permissions based authorization (Not required as OAuth2 does it by default)

gem 'cancancan'

gem 'grape-cancan'

Use Grape-Jbuilder for easy rendering of Json views.

gem 'grape-jbuilder'

Use Fog for connecting to cloud providers

gem 'fog'

Use sidekiq for background processing jobs

gem 'sidekiq'

Use hashids for masking database ids

gem 'hashids'

Use apitome to generate api documentation in rails

gem 'apitome' ----- end of Gemfile ----`