madzhuga / rails_workflow Goto Github PK
View Code? Open in Web Editor NEWCheck Wiki for details
License: MIT License
Check Wiki for details
License: MIT License
/Users/fangqi/.rvm/gems/ruby-2.2.4/gems/rails_workflow-0.7.2/lib/rails_workflow/config.rb:17:in `require_relative': /Users/fangqi/.rvm/gems/ruby-2.2.4/gems/rails_workflow-0.7.2/lib/rails_workflow/operation_runner.rb:65: syntax error, unexpected '.' (SyntaxError)
context&.save
please take a look
Even though it is mentioned we can switch to mysql
in the README, the pg dependency still be listed in the gemspec so we still must install PostgreSQL and pg gem. Could you consider remove pg dependency?
Instead of relying solely on Sidekiq regarding the background processing, I think it would be much more flexible regarding the selection of background processing system if Active Job was used (Rails 4.2+).
$ rails generate rails_workflow:install
$ bundle exec rake db:migrate
== 20150630090558 CreateWorkflowProcesses: migrating ==========================
-- table_exists?(:workflow_processes)
-> 0.0007s
-- table_exists?(:rails_workflow_processes)
-> 0.0003s
-- table_exists?(:workflow_operations)
-> 0.0005s
-- table_exists?(:rails_workflow_operations)
-> 0.0003s
-- table_exists?(:workflow_process_templates)
-> 0.0005s
-- table_exists?(:rails_workflow_process_templates)
-> 0.0003s
-- table_exists?(:workflow_operation_templates)
-> 0.0005s
-- table_exists?(:rails_workflow_operation_templates)
-> 0.0003s
-- table_exists?(:workflow_contexts)
-> 0.0005s
-- table_exists?(:rails_workflow_contexts)
-> 0.0003s
-- table_exists?(:workflow_errors)
-> 0.0005s
-- table_exists?(:rails_workflow_errors)
-> 0.0003s
-- column_exists?(:rails_workflow_contexts, :parent_id)
-> 0.0014s
-- column_exists?(:rails_workflow_contexts, :parent_type)
-> 0.0009s
-- column_exists?(:rails_workflow_contexts, :body)
-> 0.0010s
-- column_exists?(:rails_workflow_contexts, :created_at)
-> 0.0009s
-- column_exists?(:rails_workflow_contexts, :updated_at)
-> 0.0010s
-- column_exists?(:rails_workflow_errors, :message)
-> 0.0011s
-- column_exists?(:rails_workflow_errors, :stack_trace)
-> 0.0010s
-- column_exists?(:rails_workflow_errors, :parent_id)
-> 0.0009s
-- column_exists?(:rails_workflow_errors, :parent_type)
-> 0.0010s
-- column_exists?(:rails_workflow_errors, :created_at)
-> 0.0010s
-- column_exists?(:rails_workflow_errors, :updated_at)
-> 0.0010s
-- column_exists?(:rails_workflow_errors, :resolved)
-> 0.0010s
-- column_exists?(:rails_workflow_operation_templates, :title)
-> 0.0010s
-- column_exists?(:rails_workflow_operation_templates, :version)
-> 0.0010s
-- column_exists?(:rails_workflow_operation_templates, :uuid)
-> 0.0009s
-- add_column(:rails_workflow_operation_templates, :uuid, :uuid)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uuid' at line 1: ALTER TABLE `rails_workflow_operation_templates` ADD `uuid` uuid
# ...
/app/db/migrate/20150630090558_create_workflow_processes.rb:136:in `block (2 levels) in create_columns'
/app/db/migrate/20150630090558_create_workflow_processes.rb:134:in `map'
/app/db/migrate/20150630090558_create_workflow_processes.rb:134:in `block in create_columns'
/app/db/migrate/20150630090558_create_workflow_processes.rb:133:in `each'
/app/db/migrate/20150630090558_create_workflow_processes.rb:133:in `create_columns'
/app/db/migrate/20150630090558_create_workflow_processes.rb:4:in `change'
# ...
ActiveRecord::StatementInvalid: Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uuid' at line 1: ALTER TABLE `rails_workflow_operation_templates` ADD `uuid` uuid
# ...
Mysql2::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'uuid' at line 1
# ...
Hi! I am working on a Rails application that has a large workflow component: https://github.com/18F/C2
Right now, we are using the workflow gem (https://github.com/geekq/workflow) to manage it but we are quickly realizing its limits. eg: when we want to add a few step or have custom workflows, it is a big pain to refactor.
Most importantly, we'd like to develop our app into a platform where we can have easily configurable workflows for different user types.
I am very interested in the engine approach you have developed here. I took a peek at the tutorial but would love to see a live demo. Do you have one floating around that I could check out?
Thank you!
Following these instructions, I get an error at localhost:3000/workflows/
ActionView::MissingTemplate - Missing template rails_workflow/operations/index with {:locale=>[:en], :formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw, :ruby, :coffee, :jbuilder]}. Searched in:
* "/path/app/views"
* "/path/.rvm/gems/ruby-2.1.2/gems/rails_workflow-0.3.2/app/views"
* "/path/.rvm/gems/ruby-2.1.2/gems/bootstrap-sass-extras-0.0.6/app/views"
* "/path/.rvm/gems/ruby-2.1.2/bundler/gems/devise-aa49dd53b557/app/views"
There is a file /path/.rvm/gems/ruby-2.1.2/gems/bootstrap-sass-extras-0.0.6/app/views/rails_workflow/operations/index.html.slim
. I'm unfamiliar with .slim
templates, but I think rails_workflow must have an undocumented template handler dependency?
Hello I really like your gem but i need to know following points:
I am also looking deep into your gem your answer can save some of my time.
Thanks For your reply in advance
undefined method before_filter' for
RailsWorkflow::OperationsController:Class`
Details below:
Notice that user is able to see the operation. It should not be seen as Manager has not yet performed any action.
User (with Delivery Manager role) should be able to see operation only when both (Team lead and Manager) have completed their action.
Hi,
When launching the console on production i see many warnings. In development mode all looks ok.
$ bundle exec rails c production
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:31: warning: already initialized constant RailsWorkflow::Status::NOT_STARTED
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:31: warning: previous definition of NOT_STARTED was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:32: warning: already initialized constant RailsWorkflow::Status::IN_PROGRESS
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:32: warning: previous definition of IN_PROGRESS was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:33: warning: already initialized constant RailsWorkflow::Status::DONE
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:33: warning: previous definition of DONE was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:34: warning: already initialized constant RailsWorkflow::Status::WAITING
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:34: warning: previous definition of WAITING was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:35: warning: already initialized constant RailsWorkflow::Status::ERROR
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:35: warning: previous definition of ERROR was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:36: warning: already initialized constant RailsWorkflow::Status::CANCELED
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:36: warning: previous definition of CANCELED was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:37: warning: already initialized constant RailsWorkflow::Status::SKIPPED
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:37: warning: previous definition of SKIPPED was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:38: warning: already initialized constant RailsWorkflow::Status::ROLLBACK
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:38: warning: previous definition of ROLLBACK was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:31: warning: already initialized constant RailsWorkflow::Status::NOT_STARTED
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:31: warning: previous definition of NOT_STARTED was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:32: warning: already initialized constant RailsWorkflow::Status::IN_PROGRESS
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:32: warning: previous definition of IN_PROGRESS was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:33: warning: already initialized constant RailsWorkflow::Status::DONE
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:33: warning: previous definition of DONE was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:34: warning: already initialized constant RailsWorkflow::Status::WAITING
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:34: warning: previous definition of WAITING was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:35: warning: already initialized constant RailsWorkflow::Status::ERROR
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:35: warning: previous definition of ERROR was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:36: warning: already initialized constant RailsWorkflow::Status::CANCELED
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:36: warning: previous definition of CANCELED was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:37: warning: already initialized constant RailsWorkflow::Status::SKIPPED
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:37: warning: previous definition of SKIPPED was here
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:38: warning: already initialized constant RailsWorkflow::Status::ROLLBACK
/xxx/xxx/xxxx/shared/bundle/ruby/2.3.0/gems/rails_workflow-0.3.5/app/concerns/rails_workflow/status.rb:38: warning: previous definition of ROLLBACK was here
I created a new project with rails 4.1.9 (ruby 2.1.5).
Gemfile is standard. Added the line "gem 'rails_workflow', '0.2.1'".
After bundle install I added the line
mount RailsWorkflow::Engine => '/workflow', as: 'workflow'
in routes.rb.
After executing "rails generate rails_workflow:install" the first error was
/.rvm/gems/ruby-2.1.5@railsworkflow/gems/activesupport-4.1.9/lib/active_support/dependencies.rb:247:in `require': cannot load such file -- devise (LoadError)
I added devise in the gemfile (gem 'devise'). After the next bundle install the following error appeared:
/.rvm/gems/ruby-2.1.5@railsworkflow/gems/rails_workflow-0.2.1/config/initializers/will_paginate.rb:8:in `module:ActionView': uninitialized constant WillPaginate::ActionView::LinkRenderer (NameError)
In the adding user operation page, if I check the dependencies but not check any status, operation_templates_controller will get an error "undefined method `map' for nil:NilClass" in line 73.
It seems that e.g. the creation of process templates (or any model using guids) is broken currently under Windows because of how the guid gem detects Windows. I tested this only with x64 version of Ruby, so not sure if it still works for x86.
I would suggest changing this:
https://github.com/madzhuga/rails_workflow/blob/master/app/concerns/rails_workflow/uuid.rb#L10
Into:
self.uuid = SecureRandom.uuid
I've been experimenting with this gem (very cool!) and can't wrap my head around what background and asynchronous are meant to be used for on Operations.
Background
When background is true, ActiveJob performs the task with a background job. Otherwise it is performed "now", synchronously.
Asynchronous
I don't understand what this does and I can't tell the difference from a workflow perspective.
What I'm looking for
What I was hoping for is a way to configure a workflow, so that if a user attempts to perform an Operation in a way that will not succeed because of dependencies and conditions, that the attempt to complete the operation (say the gem's complete method) would fail. At this point I'd just return the user an error message recommending next steps.
I'd like to avoid having to duplicate these checks both in validations (activerecord) and in the workflow process. Also, the complexity of the dependency relationships is a big reason why I'm looking at rails_workflow.
Could you enlighten us?
Processing fails on Rails 5.1 due to this error:
wrong number of arguments (given 1, expected 0)
/Users/dpitman/.rvm/gems/ruby-2.3.5/gems/activerecord-5.1.4/lib/active_record/associations/collection_association.rb:28:in `reader'
/Users/dpitman/.rvm/gems/ruby-2.3.5/gems/activerecord-5.1.4/lib/active_record/associations/builder/association.rb:111:in `operations'
/Users/dpitman/others-repositories/rails_workflow/app/models/rails_workflow/process.rb:50:in `uncompleted_operations'
/Users/dpitman/others-repositories/rails_workflow/app/models/rails_workflow/process.rb:44:in `uncompleted?'
This is fixed by not passing in true
to the operations
association in RailsWorkflow::Process
:
converge-co@630a4c8
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Index name 'index_rails_workflow_operation_templates_on_process_template_id' on table 'rails_workflow_operation_templates' is too long; the limit is 62 characters/home/jmunyi/rails_play_ground/pinboard/db/migrate/20151117091953_create_workflow_processes.rb:38:in `block in create_indexes'
When running migration it throws the following exception:
$ rails db:migrate
rails aborted!
StandardError: An error has occurred, this and all later migrations canceled:
Directly inheriting from ActiveRecord::Migration is not supported. Please specify the Rails release the migration was written for:
class CreateWorkflowProcesses < ActiveRecord::Migration[4.2]
Is it not supported for these versions?
$ ruby --version
ruby 2.4.3p205 (2017-12-14 revision 61247) [x86_64-linux]
$ rails --version
Rails 5.1.4
rails_workflow/operation_runner.rb
line 65: context&.save should be context.save
Hi @madzhuga and rails_workflow community,
Is it production ready to use ?
Could you please share those who deployed in production, regarding any issue faced and so on ... ?
Thanks.
index name 'index_rails_workflow_operation_templates_on_process_template_id' on table 'rails_workflow_operation_templates' is too long; the limit is 62 characters/Users/dougf/.rvm/gems/ruby-2.2.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract/schema_statements.rb:936:in `add_index_options'
I can't find where these are defined by rails_workflow, is there some configuration I am missing?
default rails 5 app uses sqlite 3
The wiki mentioned adding this to config/application.rb
require 'rails_workflow'
But that part is not in README.md
undefined method `respond_to' for RailsWorkflow::OperationsController:Class Did you mean? respond_to?
Hi..thanks for your work.
I cant bundle install because it requires an installed postgres db which I don't want to install.
gem 'rails', '4.2.6'
gem 'rails_workflow', '0.3.1'
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Would be great to have a choice.
Greetings
Werner
Hi
I'm getting the following error when trying to migrate the database. Any ideas on how to solve this. All dependencies seem to be installed correctly.
D:\Workspace\sad>bundle exec rake db:migrate
DL is deprecated, please use Fiddle
DL is deprecated, please use Fiddle
== 20150123172243 CreateWorkflowWfProcesses: migrating ========================
-- create_table(:workflow_processes)
-> 0.0110s
-- create_table(:workflow_operations)
-> 0.0050s
-- create_table(:workflow_process_templates)
-> 0.0050s
-- create_table(:workflow_operation_templates)
-> 0.0040s
-- add_column(:workflow_processes, :template_id, :integer)
-> 0.0150s
-- add_column(:workflow_processes, :type, :string)
-> 0.0150s
-- add_column(:workflow_operations, :process_id, :integer)
-> 0.0180s
-- add_column(:workflow_operations, :template_id, :integer)
-> 0.0140s
-- add_column(:workflow_operation_templates, :async, :boolean)
-> 0.0140s
-- add_column(:workflow_operations, :dependencies, :text)
-> 0.0130s
-- add_column(:workflow_operation_templates, :child_process_id, :integer)
-> 0.0130s
-- add_column(:workflow_operations, :child_process_id, :integer)
-> 0.0120s
-- add_column(:workflow_operation_templates, :assignment_id, :integer)
-> 0.0130s
-- add_column(:workflow_operation_templates, :assignment_type, :string)
-> 0.0110s
-- add_column(:workflow_operations, :assignment_id, :integer)
-> 0.0120s
-- add_column(:workflow_operations, :assignment_type, :string)
-> 0.0110s
-- add_column(:workflow_operations, :assigned_at, :datetime)
-> 0.0100s
-- add_column(:workflow_operation_templates, :kind, :string)
-> 0.0100s
-- add_column(:workflow_operation_templates, :role, :string)
-> 0.0120s
-- add_column(:workflow_operation_templates, :group, :string)
-> 0.0130s
-- add_column(:workflow_operations, :type, :string)
-> 0.0120s
-- add_column(:workflow_operations, :is_active, :boolean)
-> 0.0130s
-- add_column(:workflow_operation_templates, :instruction, :text)
-> 0.0110s
-- create_table(:workflow_contexts)
rake aborted!
StandardError: An error has occurred, all later migrations canceled:
undefined method json' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x5edc6a0>D:in
migrate'
NoMethodError: undefined method json' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x5edc6a0> D:in
migrate'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)
'
Issue with Json type column with PostgreSQL,
Stacktrace.......
singh@singh-Latitude-E5450:~/project/jen_etl/db/migrate$ bundle exec rake db:migrate --trace
(in /home/singh/project/jen_etl)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Execute db:load_config
** Execute db:migrate
== 20150123172243 CreateWorkflowWfProcesses: migrating ========================
-- create_table(:workflow_processes)
-> 0.0008s
-- create_table(:workflow_operations)
-> 0.0005s
-- create_table(:workflow_process_templates)
-> 0.0005s
-- create_table(:workflow_operation_templates)
-> 0.0005s
-- add_column(:workflow_processes, :template_id, :integer)
-> 0.0003s
-- add_column(:workflow_processes, :type, :string)
-> 0.0002s
-- add_column(:workflow_operations, :process_id, :integer)
-> 0.0003s
-- add_column(:workflow_operations, :template_id, :integer)
-> 0.0002s
-- add_column(:workflow_operation_templates, :async, :boolean)
-> 0.0003s
-- add_column(:workflow_operations, :dependencies, :text)
-> 0.0002s
-- add_column(:workflow_operation_templates, :child_process_id, :integer)
-> 0.0003s
-- add_column(:workflow_operations, :child_process_id, :integer)
-> 0.0002s
-- add_column(:workflow_operation_templates, :assignment_id, :integer)
-> 0.0002s
-- add_column(:workflow_operation_templates, :assignment_type, :string)
-> 0.0002s
-- add_column(:workflow_operations, :assignment_id, :integer)
-> 0.0002s
-- add_column(:workflow_operations, :assignment_type, :string)
-> 0.0003s
-- add_column(:workflow_operations, :assigned_at, :datetime)
-> 0.0002s
-- add_column(:workflow_operation_templates, :kind, :string)
-> 0.0002s
-- add_column(:workflow_operation_templates, :role, :string)
-> 0.0002s
-- add_column(:workflow_operation_templates, :group, :string)
-> 0.0002s
-- add_column(:workflow_operations, :type, :string)
-> 0.0002s
-- add_column(:workflow_operations, :is_active, :boolean)
-> 0.0002s
-- add_column(:workflow_operation_templates, :instruction, :text)
-> 0.0002s
-- create_table(:workflow_contexts)
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:
undefined method json' for #<ActiveRecord::ConnectionAdapters::TableDefinition:0x000000054940a8>/var/lib/gems/1.9.1/gems/rails_workflow-0.2.2/db/migrate/20150123172243_create_workflow_wf_processes.rb:66:in
block in change'
/var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/connection_adapters/abstract/schema_statements.rb:202:in create_table' /var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:662:in
block in method_missing'
/var/lib/gems/1.9.1/gems/activerecord-4.2.1/lib/active_record/migration.rb:632:in block in say_with_time' /usr/lib/ruby/1.9.1/benchmark.rb:280:in
measure'
Hi @madzhuga just wondering if you have any idea why there aren't any good workflow gems? I'm sure that's why you started this project. But any ideas why gems like Stonepath and Ruote never took off?
It seems really odd to me since most project I work on always have some business process and I've never found a good way of managing them.
Is it because people are just using state machines to manage workflows? Or maybe a combination of service objects and state machines or something?
Anyway, curious to hear your thoughts!
Also, good luck on this project!
Hi, I cant get the rails_workflow gem to install, can you please advise? I tried with both rails 5.1.4 & 5.2.3
Many thanks in advance!
G
error message:
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:90: warning: already initialized constant FileUtils::VERSION
'
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.2.0/lib/fileutils/version.rb:4: warning: previous definition of VERSION was here
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1188: warning: already initialized constant FileUtils::Entry_::S_IF_DOOR
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.2.0/lib/fileutils.rb:1267: warning: previous definition of S_IF_DOOR was here
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1446: warning: already initialized constant FileUtils::Entry_::DIRECTORY_TERM
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.2.0/lib/fileutils.rb:1547: warning: previous definition of DIRECTORY_TERM was here
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1448: warning: already initialized constant FileUtils::Entry_::SYSCASE
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.2.0/lib/fileutils.rb:1549: warning: previous definition of SYSCASE was here
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1501: warning: already initialized constant FileUtils::OPT_TABLE
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.2.0/lib/fileutils.rb:1602: warning: previous definition of OPT_TABLE was here
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1555: warning: already initialized constant FileUtils::LOW_METHODS
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.2.0/lib/fileutils.rb:1656: warning: previous definition of LOW_METHODS was here
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/fileutils.rb:1562: warning: already initialized constant FileUtils::METHODS
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/fileutils-1.2.0/lib/fileutils.rb:1663: warning: previous definition of METHODS was here
/Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/railtie/configuration.rb:97:inmethod_missing': undefined method
assets' for #Rails::Application::Configuration:0x00007fe198a14560
Did you mean? asset_host (NoMethodError)
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/rails_workflow-0.7.3/lib/rails_workflow/engine.rb:22:inblock in <class:Engine>' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in
instance_exec'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:inrun' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in
block in run_initializers'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:228:inblock in tsort_each' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:350:in
block (2 levels) in each_strongly_connected_component'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:431:ineach_strongly_connected_component_from' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:349:in
block in each_strongly_connected_component'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:347:ineach' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:347:in
call'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:347:ineach_strongly_connected_component' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:226:in
tsort_each'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/2.5.0/tsort.rb:205:intsort_each' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in
run_initializers'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/railties-5.2.3/lib/rails/application.rb:361:ininitialize!' from /Users/guest/workspace/workflowapp/config/environment.rb:5:in
<top (required)>'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:inrequire' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in
block in require_with_bootsnap_lfi'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:inregister' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in
require_with_bootsnap_lfi'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/bootsnap-1.4.4/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:inrequire' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in
block in require'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:257:inload_dependency' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/activesupport-5.2.3/lib/active_support/dependencies.rb:291:in
require'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:102:inpreload' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:153:in
serve'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:141:inblock in run' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:in
loop'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/application.rb:135:inrun' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/gems/2.5.0/gems/spring-2.0.2/lib/spring/application/boot.rb:19:in
<top (required)>'
from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:inrequire' from /Users/guest/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in
require'
from -e:1:in `
Gemfile:
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '2.5.3'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 5.2.3'
#gem 'rails', '5.1.4'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 3.11'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.5'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# Use ActiveStorage variant
# gem 'mini_magick', '~> 4.8'
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.1.0', require: false
#rails workflow
gem 'rails_workflow'
gem 'active_model_serializers'
gem 'activejob'
gem 'bootstrap-rails-engine'
gem 'draper'
gem 'guid'
gem 'jquery-rails'
gem 'jquery-ui-rails'
gem 'slim-rails'
gem 'will_paginate'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end
group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '>= 3.0.5', '< 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end
group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of chromedriver to run system tests with Chrome
gem 'chromedriver-helper'
#workflow
gem 'devise'
gem 'rails-controller-testing'
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
This gem makes implicit assumptions that it would be helpful to document; e.g.,
def assignment
[
::User.role_text(object.role),
::User.group_text(object.group)
].compact.join(", ")
end
This assumes the User
model has .role_text
and .group_text
class methods that operate as expected.
$ rails generate rails_workflow:install
/home/me/.rvm/gems/ruby-2.3.1/gems/draper-2.1.0/lib/draper.rb:5:in `require': cannot load such file -- active_model/serializers/xml (LoadError)
from /home/me/.rvm/gems/ruby-2.3.1/gems/draper-2.1.0/lib/draper.rb:5:in `<top (required)>'
from /home/me/.rvm/gems/ruby-2.3.1/gems/rails_workflow-0.3.6/lib/rails_workflow.rb:7:in `require'
from /home/me/.rvm/gems/ruby-2.3.1/gems/rails_workflow-0.3.6/lib/rails_workflow.rb:7:in `<top (required)>'
from /home/me/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `require'
from /home/me/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:86:in `block (2 levels) in require'
from /home/me/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `each'
from /home/me/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:81:in `block in require'
from /home/me/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `each'
from /home/me/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler/runtime.rb:70:in `require'
from /home/me/.rvm/gems/ruby-2.3.1/gems/bundler-1.12.5/lib/bundler.rb:102:in `require'
from /home/me/Downloads/rails_workflow_test/config/application.rb:7:in `<top (required)>'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.