stpl / systango_hrm

Redmine plugin that allows for leave management of users.
7 stars 4 forks source link

Installation Error #1

Open nsrivastava2 opened 10 years ago

nsrivastava2 commented 10 years ago

When I am trying to install your plugin it keeps on giving the error that Money Gem is not installed. I have installed the same yet, the error keeps coming

root@redmine:/home/redmine/redmine/plugins/systango_hrm# rake redmine:plugins NAME=systango_hrm RAILS_ENV=production (in /home/redmine/redmine) Could not find gem 'money (~> 5.1.0) ruby' in the gems available on this machine. Run bundle install to install missing gems.

nsrivastava2 commented 10 years ago

I also get the following error:

root@redmine:/home/redmine/redmine/plugins# rake redmine:plugins:migrate NAME=redmine_knowledgebase RAILS_ENV=production (in /home/redmine/redmine) Could not find gem 'ya2yaml (>= 0) ruby' in the gems available on this machine. Run bundle install to install missing gems.

stpl commented 10 years ago

Is this still an issue?

Thanks

ghost commented 9 years ago

I have a similiar problem, any recomandations ?

rake redmine:plugins NAME=systango_hrm RAILS_ENV=production rake aborted! NoMethodError: undefined method `state_machine' for SystangoHrmEmployeeLeave(Table doesn't exist):Class

:10:in`synchronize' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace) rake redmine:plugins NAME=systango_hrm RAILS_ENV=production --trace *\* Invoke redmine:plugins (first_time) *\* Execute redmine:plugins *\* Invoke redmine:plugins:migrate (first_time) *\* Invoke environment (first_time) *\* Execute environment rake aborted! NoMethodError: undefined method `state_machine' for SystangoHrmEmployeeLeave(Table doesn't exist):Class /usr/lib/ruby/vendor_ruby/active_record/dynamic_matchers.rb:55:in`method_missing' /usr/share/redmine/plugins/systango_hrm/lib/systango_hrm/systango_hrm_employee_leave_state_machine.rb:5:in `block in included' /usr/share/redmine/plugins/systango_hrm/lib/systango_hrm/systango_hrm_employee_leave_state_machine.rb:4:in`class_eval' /usr/share/redmine/plugins/systango_hrm/lib/systango_hrm/systango_hrm_employee_leave_state_machine.rb:4:in `included' /usr/share/redmine/plugins/systango_hrm/app/models/systango_hrm_employee_leave.rb:4:in`include' /usr/share/redmine/plugins/systango_hrm/app/models/systango_hrm_employee_leave.rb:4:in `' /usr/share/redmine/plugins/systango_hrm/app/models/systango_hrm_employee_leave.rb:1:in`' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in`require' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `block in require' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:236:in`load_dependency' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:251:in `require' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:359:in`require_or_load' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:502:in `load_missing_constant' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:192:in`block in const_missing' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:190:in `each' /usr/lib/ruby/vendor_ruby/active_support/dependencies.rb:190:in`const_missing' /usr/lib/ruby/vendor_ruby/active_support/inflector/methods.rb:229:in `block in constantize' /usr/lib/ruby/vendor_ruby/active_support/inflector/methods.rb:228:in`each' /usr/lib/ruby/vendor_ruby/active_support/inflector/methods.rb:228:in `constantize' /usr/lib/ruby/vendor_ruby/active_support/core_ext/string/inflections.rb:54:in`constantize' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:210:in `observed_class' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:203:in`observed_classes' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:223:in `observed_classes' /usr/lib/ruby/vendor_ruby/active_record/observer.rb:96:in`observed_classes' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:219:in `initialize' /usr/lib/ruby/1.9.1/singleton.rb:141:in`new' /usr/lib/ruby/1.9.1/singleton.rb:141:in `block in instance' :10:in`synchronize' /usr/lib/ruby/1.9.1/singleton.rb:139:in `instance' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:86:in`instantiate_observer' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:59:in `block in instantiate_observers' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:59:in`each' /usr/lib/ruby/vendor_ruby/active_model/observing.rb:59:in `instantiate_observers' /usr/lib/ruby/vendor_ruby/active_record/railtie.rb:117:in`block (2 levels) in class:Railtie' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:36:in `instance_eval' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:36:in`execute_hook' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:26:in `block in on_load' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:25:in`each' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:25:in `on_load' /usr/lib/ruby/vendor_ruby/active_record/railtie.rb:116:in`block in class:Railtie' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:34:in `call' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:34:in`execute_hook' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:43:in `block in run_load_hooks' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:42:in`each' /usr/lib/ruby/vendor_ruby/active_support/lazy_load_hooks.rb:42:in `run_load_hooks' /usr/lib/ruby/vendor_ruby/rails/application/finisher.rb:59:in`block in module:Finisher' /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in `instance_exec' /usr/lib/ruby/vendor_ruby/rails/initializable.rb:30:in`run' /usr/lib/ruby/vendor_ruby/rails/initializable.rb:55:in `block in run_initializers' /usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in`each' /usr/lib/ruby/vendor_ruby/rails/initializable.rb:54:in `run_initializers' /usr/lib/ruby/vendor_ruby/rails/application.rb:136:in`initialize!' /usr/lib/ruby/vendor_ruby/rails/railtie/configurable.rb:30:in `method_missing' /usr/share/redmine/config/environment.rb:14:in`' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in`require' /usr/lib/ruby/vendor_ruby/rails/application.rb:103:in `require_environment!' /usr/lib/ruby/vendor_ruby/rails/application.rb:292:in`block (2 levels) in initialize_tasks' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in `call' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in`block in execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in `each' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in`execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:in`mon_synchronize' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:201:in`block in invoke_prerequisites' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:199:in `each' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:199:in`invoke_prerequisites' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:in`mon_synchronize' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in `invoke_with_call_chain' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in`invoke' /usr/share/redmine/lib/tasks/redmine.rake:52:in `block (2 levels) in ' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in`call' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:240:in `block in execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in`each' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:235:in `execute' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:179:in`block in invoke_with_call_chain' /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:172:in`invoke_with_call_chain' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/task.rb:165:in `invoke' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:150:in`invoke_task' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in `block (2 levels) in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in`each' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:106:in `block in top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:115:in`run_with_threads' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:100:in `top_level' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:78:in`block in run' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in `standard_exception_handling' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:in`run' /var/lib/gems/1.9.1/gems/rake-10.3.2/bin/rake:33:in `' /usr/local/bin/rake:23:in`load' /usr/local/bin/rake:23:in `
' Tasks: TOP => redmine:plugins:migrate => environment
stpl commented 9 years ago

Hi @procesorrr , It seems like you have installed the plugin incorrectly. Please provide your installation steps, so that we can identify the issue.

ghost commented 9 years ago

Hi guys, Thanks for the reply, the steps we're the following.

  1. git clone 'url'
  2. bundle install -> installed all the dependency
  3. rake redmine:plugins NAME=systango_hrm RAILS_ENV=production -> here i got my first error.

NoMethodError: undefined method `state_machine' for SystangoHrmEmployeeLeave(Table doesn't exist):Class

:10:in`synchronize' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace) Then started the redmine. Can the database affect it ? im using sqlite3 ?
stpl commented 9 years ago

Hi @procesorrr Database doesn't affects this. It occurs when you are running migrations.

I think there is some other issue, may be the installation process. Can you please let us know commands including your console paths and output from the steps you started this plugin's installation so that we can replicate the issue.

Also do let us know your Redmine version.

ghost commented 9 years ago

Hi guys,

Redmine version is 2.5.1 stable, os is Debian 7.6, ruby version 1.9.3, rake version 10.3.2 and bellow is a list of all my gems,

actionmailer (4.1.6) actionpack (4.1.6) actionview (4.1.6) activemodel (4.1.6) activerecord (4.1.6) activesupport (4.1.6) arel (5.0.1.20140414130214) builder (3.2.2) bundle (0.0.1) bundler (1.7.4) columnize (0.8.9) debugger-linecache (1.2.0) delayed_job (4.0.4) delayed_job_active_record (4.0.2) erubis (2.7.0) hike (1.2.3) i18n (0.6.11) json (1.8.1) mail (2.6.1) mime-types (2.4.3) mini_portile (0.6.0) minitest (5.4.2) multi_json (1.10.1) nokogiri (1.6.3.1) rack (1.5.2) rack-test (0.6.2) rails (4.1.6) railties (4.1.6) rake (10.3.2) slop (3.6.0) sprockets (2.12.2) sprockets-rails (2.2.0) sqlite3 (1.3.9) state_machine (1.2.0) thor (0.19.1) thread_safe (0.3.4) tilt (1.4.1) tzinfo (1.2.2) webrat (0.7.3) will_paginate (3.0.7)

The steps are the same i mentioned in my first post.

  1. git clone 'url'
  2. bundle install -> installed all the dependency
  3. rake redmine:plugins NAME=systango_hrm RAILS_ENV=production -> here i got my first error.

Thank you for your time, Alin M

ghost commented 9 years ago

root@xxx:/usr/share/redmine/plugins/systango_hrm# bundle install --without development test RAILS_ENV=production Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. Using i18n 0.6.11 Using json 1.8.1 Using minitest 5.4.2 Using thread_safe 0.3.4 Using tzinfo 1.2.2 Using activesupport 4.1.6 Using builder 3.2.2 Using activemodel 4.1.6 Using arel 5.0.1.20140414130214 Using activerecord 4.1.6 Using delayed_job 4.0.4 Using delayed_job_active_record 4.0.2 Using state_machine 1.2.0 Using will_paginate 3.0.7 Using bundler 1.7.4 Your bundle is complete! Gems in the groups development, test and RAILS_ENV=production were not installed. Use bundle show [gemname] to see where a bundled gem is installed.

root@xxx:/usr/share/redmine/plugins/systango_hrm# rake redmine:plugins NAME=systango_hrm RAILS_ENV=production (in /usr/share/redmine) rake aborted! NoMethodError: undefined method `state_machine' for SystangoHrmEmployeeLeave(Table doesn't exist):Class

:10:in`synchronize' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace) Am from here it doesnt work..
stpl commented 9 years ago

@procesorrr

Please try to install gems from redmine directory (root@xxx:/usr/share/redmine#) instead of plugins directory. Let me know if this works.

ghost commented 9 years ago

@stpl

Unfortunatly it still doesn't work, i've copied the plugin Gemfile in /usr/share/redmine, ran bundle install, all the plugins we're installed succesfully, but when i run "rake redmine:plugins NAME=systango_hrm RAILS_ENV=production" the same error

root@xxx:/usr/share/redmine# rake redmine:plugins NAME=systango_hrm RAILS_ENV=production rake aborted! NoMethodError: undefined method `state_machine' for SystangoHrmEmployeeLeave(Table doesn't exist):Class

:10:in`synchronize' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace) I think this happens with 2 issues, 1 it doesnt recognize state_machine gem for uknown reason, or sql create is missing. If you have any lead on this please let me know, in the last resort i will change the distro.
stpl commented 9 years ago

@procesorrr , Please do not replace Redmine's Gemfile with plugin's Gemfile. Redmine have it's own gems. So once you get Redmine's Gemfile back. Try to run from /usr/share/redmine :

Please let me know if problem still alive.

ghost commented 9 years ago

@stpl

Sorry for the late response, now another issues arrised, it's never ending. I will try to install on another distro.

root@xxx:/usr/share/redmine# bundle exec rake redmine:plugins NAME=systango_hrm RAILS_ENV=production rake aborted! NoMethodError: undefined method eager_load_namespaces' for #<Rails::Railtie::Configuration:0x000000021d4460> /var/lib/gems/1.9.1/gems/activesupport-4.1.6/lib/active_support/railtie.rb:8:inclass:Railtie' /var/lib/gems/1.9.1/gems/activesupport-4.1.6/lib/active_support/railtie.rb:5:in <module:ActiveSupport>' /var/lib/gems/1.9.1/gems/activesupport-4.1.6/lib/active_support/railtie.rb:4:in<top (required)>' (See full trace by running task with --trace)

root@xxx:/usr/share/redmine# bundle exec rake redmine:plugins NAME=systango_hrm RAILS_ENV=production --trace rake aborted! NoMethodError: undefined method eager_load_namespaces' for #<Rails::Railtie::Configuration:0x000000020484e8> /usr/lib/ruby/vendor_ruby/rails/railtie/configuration.rb:85:inmethod_missing' /var/lib/gems/1.9.1/gems/activesupport-4.1.6/lib/active_support/railtie.rb:8:in <class:Railtie>' /var/lib/gems/1.9.1/gems/activesupport-4.1.6/lib/active_support/railtie.rb:5:inmodule:ActiveSupport' /var/lib/gems/1.9.1/gems/activesupport-4.1.6/lib/active_support/railtie.rb:4:in <top (required)>' /usr/lib/ruby/vendor_ruby/rails.rb:13:inrequire' /usr/lib/ruby/vendor_ruby/rails.rb:13:in <top (required)>' /usr/lib/ruby/vendor_ruby/rails/all.rb:1:inrequire' /usr/lib/ruby/vendor_ruby/rails/all.rb:1:in <top (required)>' /usr/share/redmine/config/application.rb:3:inrequire' /usr/share/redmine/config/application.rb:3:in <top (required)>' /usr/share/redmine/Rakefile:5:inrequire' /usr/share/redmine/Rakefile:5:in <top (required)>' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/rake_module.rb:28:inload' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/rake_module.rb:28:in load_rakefile' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:687:inraw_load_rakefile' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:94:in block in load_rakefile' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:instandard_exception_handling' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:93:in load_rakefile' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:77:inblock in run' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:176:in standard_exception_handling' /var/lib/gems/1.9.1/gems/rake-10.3.2/lib/rake/application.rb:75:inrun' /var/lib/gems/1.9.1/gems/rake-10.3.2/bin/rake:33:in <top (required)>' /usr/local/bin/rake:23:inload' /usr/local/bin/rake:23:in `

'

stpl commented 9 years ago

@procesorrr

As we can see in your logs, you are using rails 4.1.6 which is not supported by Redmine till now. I think , you have configured Redmine incorrectly. I would suggest you should setup Redmine again by following below steps:

  1. Download and Unzip Redmine
  2. Run "bundle install –without development test RAILS_ENV=production" from your redmine directory to install redmine gems and dependencies.
  3. Change settings(database, email etc.) as per previous Redmine so that you'll not be any lose.
  4. Now go to redmine/plugins, then download and extract systango_hrm plugin.
  5. Move to systango_hrm directory and run "bundle install –without development test RAILS_ENV=production" from systango_hrm directory to install plugin gems and dependencies.
  6. Run Migrations : "rake redmine:plugins NAME=systango_hrm RAILS_ENV=production"
  7. Start delayed jobs: "nohup rake jobs:work RAILS_ENV=production &"

Please follow these steps carefully as I suggested. I hope it'll works :)

jorge2esteban commented 9 years ago

When install the system show the next error

DL is deprecated, please use Fiddle Your Gemfile lists the gem vcard (~> 0.2.8) more than once. You should probably keep only one of them. While it's not a problem now, it could cause errors if you change the version of just one of them later. rake aborted! NameError: uninitialized constant SystangoHrmCompoffObserver C:/Bitnami/redmine-2.6.0-3/apps/redmine/htdocs/config/environment.rb:14:in <top (required)>' C:/Bitnami/redmine-2.6.0-3/apps/redmine/htdocs/lib/tasks/redmine.rake:52:inblo ck (2 levels) in <top (required)>' Tasks: TOP => redmine:plugins:migrate => environment (See full trace by running task with --trace)