rbCAS / CASino

CASino is a Ruby-based Single Sign-On solution supporting the CAS standard
MIT License
329 stars 189 forks source link

mysql2 Installation Issues #151

Closed RossIV closed 7 years ago

RossIV commented 8 years ago

I'm trying to install CASino on Ubuntu Server 14.04, but it keeps erroring out.

I run ./script/install mysql and it appears to run fine, but then I get this:

Bundle complete! 16 Gemfile dependencies, 73 gems now installed.
Gems in the groups development, test, postgres and sqlite were not installed.
Bundled gems are installed into ./vendor/bundle.
‘config/database.yml.example.mysql’ -> ‘config/database.yml’
‘config/cas.yml.example’ -> ‘config/cas.yml’
Please configure your database in config/database.yml and hit ENTER when I should continue...
./script/install: 20: read: arg count
rake aborted!
Gem::LoadError: Specified 'mysql2' for database adapter, but the gem is not loaded. Add `gem 'mysql2'` to your Gemfile (and ensure its version is at the minimum required by ActiveRecord).

I tried bundle update mysql2 and gem install mysql2 but neither helped. Suggestions?

pencil commented 8 years ago

Weird. I updated some of the Gems in CASinoApp just now. Can you please try again?

RossIV commented 8 years ago

Progress. It's still skipping the enter prompt though.

Please configure your database in config/database.yml and hit ENTER when I should continue...
./script/install: 20: read: arg count
DEPRECATION WARNING: The configuration option `config.serve_static_assets` has been renamed to `config.serve_static_files` to clarify its role (it merely enables serving everything in the `public` folder and is unrelated to the asset pipeline). The `serve_static_assets` alias will be removed in Rails 5.0. Please migrate your configuration files accordingly. (called from block in <top (required)> at /home/ross/CASinoApp/config/environments/production.rb:12)
DEPRECATION WARNING: You did not specify a `log_level` in `production.rb`. Currently, the default value for `log_level` is `:info` for the production environment and `:debug` in all other environments. In Rails 5 the default value will be unified to `:debug` across all environments. To preserve the current setting, add the following line to your `production.rb`:

   config.log_level = :info

. (called from block in tsort_each at /home/ross/.rbenv/versions/2.2.3/lib/ruby/2.2.0/tsort.rb:226)
-- create_table("casino_auth_token_tickets", {:force=>true})
rake aborted!
Mysql2::Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
pencil commented 8 years ago

Fix the settings in config/database.yml and then run bundle exec rake db:schema:load; bundle exec rake assets:precompile

RossIV commented 8 years ago

That worked except I had to add development DB settings instead of just production. Did I miss a change in a config file somewhere?

pencil commented 8 years ago

You can run export RAILS_ENV=production if you are in a production environment :+1:

AjayBarot commented 7 years ago

@pencil: Please closed the issue.