Comments (11)
Looks like there's already a fork of remotipart that's Rails 5 compatible with a PR on deck: JangoSteve/remotipart#151
from fae.
Yup, looking to get Rails 5 support in place by the launch of the microsite.
from fae.
Ok, what's the timeline for that? I'd be interested in learning how multi-Rails version support works.
from fae.
Getting all the tests to pass would be the first step. If you want to take a crack at it, I can show you how to setup appraisal to run the test suite on the Rails 5.
from fae.
Hey guys!
I got a jump start on this in the rails-5
branch. It would appear that remotipart
needs to be upgraded, as well as any gem that uses ActionDispatch::ParamsParser
.
Stack trace for reference:
bundler: failed to load command: rspec (/Users/Tim/.rvm/gems/ruby-2.3.1@fae/bin/rspec)
RuntimeError: No such middleware to insert after: ActionDispatch::ParamsParser
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/actionpack-5.0.0/lib/action_dispatch/middleware/stack.rb:108:in `assert_index'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/actionpack-5.0.0/lib/action_dispatch/middleware/stack.rb:80:in `insert_after'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/configuration.rb:69:in `block in merge_into'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/configuration.rb:68:in `each'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/configuration.rb:68:in `merge_into'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/engine.rb:507:in `block in app'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/engine.rb:504:in `synchronize'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/engine.rb:504:in `app'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/application/finisher.rb:37:in `block in <module:Finisher>'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/initializable.rb:30:in `instance_exec'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/initializable.rb:30:in `run'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/initializable.rb:55:in `block in run_initializers'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:228:in `block in tsort_each'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:431:in `each_strongly_connected_component_from'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:349:in `block in each_strongly_connected_component'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `call'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:347:in `each_strongly_connected_component'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:226:in `tsort_each'
/Users/Tim/.rvm/rubies/ruby-2.3.1/lib/ruby/2.3.0/tsort.rb:205:in `tsort_each'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/initializable.rb:54:in `run_initializers'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/railties-5.0.0/lib/rails/application.rb:352:in `initialize!'
/Users/Tim/localserver/fae/spec/dummy/config/environment.rb:5:in `<top (required)>'
/Users/Tim/localserver/fae/spec/spec_helper.rb:3:in `require'
/Users/Tim/localserver/fae/spec/spec_helper.rb:3:in `<top (required)>'
/Users/Tim/localserver/fae/spec/rails_helper.rb:1:in `require'
/Users/Tim/localserver/fae/spec/rails_helper.rb:1:in `<top (required)>'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1025:in `require'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1025:in `block in requires='
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1025:in `each'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1025:in `requires='
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration_options.rb:101:in `block in process_options_into'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration_options.rb:100:in `each'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration_options.rb:100:in `process_options_into'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/configuration_options.rb:22:in `configure'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:96:in `setup'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:85:in `run'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/gems/rspec-core-3.0.4/exe/rspec:4:in `<top (required)>'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/bin/rspec:23:in `load'
/Users/Tim/.rvm/gems/ruby-2.3.1@fae/bin/rspec:23:in `<top (required)>'
from fae.
I'm moving on, but should anyone else pick this up, I've gotten test failures down to 10. I removed Maximus because Brakeman was also using ActionDispatch::ParamsParser
, and it's a dependency not worth having.
Main concern is with remotipart because it's a dep we can't remove. Possible solutions: fork it and update the ParamsParser
code, submit a PR, or wait for an update.
from fae.
Ok - running this rails-5 branch on my personal project. I'll keep a running list of the issues I find. So far:
path: http://localhost:3000/admin/first_user
error:
couldn't find file 'jquery.ui.sortable' with type 'application/javascript' /Users/nicholebarrett/.rvm/gems/ruby-2.3.1/bundler/gems/fae-810600f83836/app/assets/javascripts/fae/application.js:16
update:
I bundle opened the gem and commented out the following, and it worked.
// require jquery.ui.sortable
// require jquery.ui.datepicker
I think it's the version of jquery-ui-rails. Maybe.. http://stackoverflow.com/questions/19171470/ruby-on-rails-couldnt-find-file-jquery-ui-datepicker
from fae.
Per Tim's request, I added gem 'jquery-ui-rails', '~> 4.2.1'
to my gemfile. This allowed me to deploy successfully.
Now I am getting an error from the credit page. ActionView::Template Error (uninitialized constant Fae::VERSION)
on _credit.slim
from fae.
Another error:
Steps to recreate
- Save a Fae Page with changes a textarea or text field
- Error appears:
ActiveRecord::ReadOnlyRecord (Fae::TextArea is marked as readonly):
activerecord (5.0.0) lib/active_record/persistence.rb:533:in `create_or_update'
activerecord (5.0.0) lib/active_record/callbacks.rb:298:in `block in create_or_update'
activesupport (5.0.0) lib/active_support/callbacks.rb:126:in `call'
activesupport (5.0.0) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
activesupport (5.0.0) lib/active_support/callbacks.rb:455:in `call'
activesupport (5.0.0) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
activesupport (5.0.0) lib/active_support/callbacks.rb:750:in `_run_save_callbacks'
activerecord (5.0.0) lib/active_record/callbacks.rb:298:in `create_or_update'
activerecord (5.0.0) lib/active_record/persistence.rb:125:in `save'
activerecord (5.0.0) lib/active_record/validations.rb:44:in `save'
activerecord (5.0.0) lib/active_record/attribute_methods/dirty.rb:22:in `save'
activerecord (5.0.0) lib/active_record/transactions.rb:319:in `block (2 levels) in save'
activerecord (5.0.0) lib/active_record/transactions.rb:395:in `block in with_transaction_returning_status'
activerecord (5.0.0) lib/active_record/connection_adapters/abstract/database_statements.rb:230:in `transaction'
activerecord (5.0.0) lib/active_record/transactions.rb:211:in `transaction'
activerecord (5.0.0) lib/active_record/transactions.rb:392:in `with_transaction_returning_status'
activerecord (5.0.0) lib/active_record/transactions.rb:319:in `block in save'
activerecord (5.0.0) lib/active_record/transactions.rb:334:in `rollback_active_record_state!'
activerecord (5.0.0) lib/active_record/transactions.rb:318:in `save'
activerecord (5.0.0) lib/active_record/suppressor.rb:41:in `save'
activerecord (5.0.0) lib/active_record/autosave_association.rb:440:in `save_has_one_association'
Temporary solution:
- Make a new concern in
models/concerns/fae/text_area_concern.rb
:
module Fae::TextAreaConcern
extend ActiveSupport::Concern
def readonly?
false
end
end
- Repeat for
Fae::TextFieldConcern
.
from fae.
@LeChin @jamesmk re: the ActionView::Template Error (uninitialized constant Fae::VERSION)
issue - I found a solution and didn't deep dive, although this issue needs to be properly resolved before considering Fae Rails 5-ready.
Set config.eager_load
to false
in config/environments/production.rb
. Like I said, this will have to be revisited because we obviously want eager loading. Maybe requiring the gem for use in views?
from fae.
Another thing to note: rails g fae:scaffold
doesn't inject properly because it looks for ActiveRecord::Base
. Rails 5 models by default inherit from models/application_record.rb
, similar to controllers/application_controller.rb
. Therefore, the classes look like this: class Guest < ApplicationRecord
In lib/generators/fae/base_generator.rb
, the method to inject the Fae concern into the model (inject_concern
) relies on ActiveRecord::Base
. This cascades to other injections like inject_display_field_to_model
.
I resolved this on the rails-5
branch. Additionally, I'm closing this issue out and making a Rails 5 tag to track this issue more effectively.
from fae.
Related Issues (20)
- Nested forms don't seem to support wysiwyg fields HOT 6
- Delete action can raise error if the object has related items HOT 2
- Allow update to Devise 4.6.2 HOT 5
- Import data HOT 2
- add dynamic language switching to Fae::StaticPage HOT 1
- add tests to generators
- Thoughts on Rails 6? HOT 10
- Webpacker and Asset Pipeline HOT 1
- User Accounts Enumerable
- Disable "Add" button option on nested_table HOT 1
- Allow update to devise 4.7.1 HOT 2
- Allow update to simple_form 5.0.x HOT 2
- CVE-2019-16109 & CVE-2019-16676 HOT 1
- Can not found fae:install rake HOT 2
- multilingual: Fallback to English if other translation isn't available?
- No image upload field after adding has_fae_image to the model HOT 2
- Slugger for multilingual slugs? HOT 1
- "Deselect all" link gets duplicated on multi-select fields after a nested form update HOT 2
- use symbols for polymorphic route arguments HOT 1
- Rails 7 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fae.