Did you add jquery and jquery_ujs to application.js? 

Your application.js must be like:
//= require jquery
//= require jquery_ujs
//= require active_scaffold
//= require turbolinks
//= require_tree .

Maybe README doesn't work for rails 5.1 because jquery is not added to js 
manifest by default.

El lunes, 18 de diciembre de 2017 11:46:39 (CET) [email protected] escribió:
> Hi
> 
> I wanted to try out ActiveScaffold.
> 
> My environment as follows:
> 
> $ uname -a
> Linux Xerus 4.4.0-103-generic #126-Ubuntu SMP Mon Dec 4 16:23:28 UTC 2017
> x86_64 x86_64 x86_64 GNU/Linux
> 
> $ ruby -v
> ruby 2.4.2p198 (2017-09-14 revision 59899) [x86_64-linux]
> 
> $ tail -3 Gemfile
> # Additions for Active Scaffold
> gem 'active_scaffold', github: 'activescaffold/active_scaffold'
> gem "jquery-rails"
> 
> $ bundle list|grep rails
>   * coffee-rails (4.2.2)
>   * jquery-rails (4.3.1)
>   * rails (5.1.4)
>   * rails-dom-testing (2.0.3)
>   * rails-html-sanitizer (1.0.3)
>   * sass-rails (5.0.7)
>   * sprockets-rails (3.2.1)
> 
> $ bundle list|grep acti
>   * actioncable (5.1.4)
>   * actionmailer (5.1.4)
>   * actionpack (5.1.4)
>   * actionview (5.1.4)
>   * active_scaffold (3.4.99 1d3e306)
>   * activejob (5.1.4)
>   * activemodel (5.1.4)
>   * activerecord (5.1.4)
>   * activesupport (5.1.4)
> 
> $ bundle list|grep j
>   * activejob (5.1.4)
>   * execjs (2.7.0)
>   * jbuilder (2.7.0)
>   * jquery-rails (4.3.1)
>   * multi_json (1.12.2)
> 
> 
> I installed a plain vanilla app as described in the README.md
> 
> It appears as if the "Create New" and "Search" buttons don't work. When I
> click on the "Create New" button, the following lines are logged on the
> server:
> 
> Started GET "/users/new" for 127.0.0.1 at 2017-12-18 11:32:02 +0100
> *Processing by UsersController#new as JS*
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_form_messages.html.erb
> (0.3ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_form.html.erb (1.6ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_base_form.html.erb
> (6.3ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_create_form.html.erb
> (9.0ms)
> Completed 200 OK in 11ms (Views: 10.3ms | ActiveRecord: 0.0ms)
> 
> Result is no reaction in the browser.
> 
> 
> When I enter the URL direclty to the browser, it works better:
> 
> Started GET "/users/new" for 127.0.0.1 at 2017-12-18 11:32:17 +0100
> *Processing by UsersController#new as HTML*
>   Rendering
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/create.html.erb within
> layouts/application
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_messages.html.erb
> (0.7ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_form_messages.html.erb
> (2.9ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_form.html.erb (1.7ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_base_form.html.erb
> (9.6ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/_create_form.html.erb
> (12.0ms)
>   Rendered
> /home//.rbenv/versions/2.4.2/lib/ruby/gems/2.4.0/bundler/gems/active_scaffol
> d-1d3e30630ad5/app/views/active_scaffold_overrides/create.html.erb within
> layouts/application (13.2ms)
> Completed 200 OK in 39ms (Views: 37.9ms | ActiveRecord: 0.0ms)
> 
> Result is a new page that allows me to enter the user, and this page works.
> Same reaction on all other buttons.
> The difference is the processing in JS vs. HTML.
> 
> What am I am doing wrong?
> 
> Thanks!


-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails Gem" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/activescaffold.
For more options, visit https://groups.google.com/d/optout.

Reply via email to