ruby on rails - RefineryCMS: routing error introduced by portfolio gallery plugin -
i'm using refinerycms rails cms, working charm until followed answer in this question simple image gallery functionality going. i'm getting same error shown on this issue. didn't change of rails code introduce link_to tag nil reference, (there link_to image_tag line in guide i've commented out , nothing changed), it's happening in autogenerated code believe. here's full error when login refinery on site:
actioncontroller::urlgenerationerror in refinery::authentication::devise::admin::users#index showing /home/mpvoss/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/refinerycms-0a37f8090278/core/app/views/refinery/admin/_menu_item.html.erb line #1 raised: no route matches {:action=>"index", :controller=>"refinery/refinery/portfolio/admin/galleries", :locale=>:en} extracted source (around line #46): 44 message << " missing required keys: #{missing_keys.sort.inspect}" unless missing_keys.empty? 45 46 raise actioncontroller::urlgenerationerror, message 47 end 48 49 def clear trace of template inclusion: /home/mpvoss/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/refinerycms-0a37f8090278/core/app/views/refinery/admin/_menu.html.erb, /home/mpvoss/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/refinerycms-0a37f8090278/core/app/views/layouts/refinery/admin.html.erb
note: loading website without logging refinery works because it's not trying load menu code below encounters routing issue.
okay, let's have @ _menu.html.erb
<%= link_to menu_item.title, refinery.url_for(menu_item.url), :class => ("active" if menu_item.highlighted?(params)), :id => "plugin_#{menu_item.name}" %>
this code makes menu bar plugins. can commented out , refinery works (the error above goes away), need menu bar make changes website.
what i've tried.
i found galleries_controller.rb in ~/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/refinerycms-portfolio-289b85b18771/app/controllers/refinery/portfolio/admin, seems controller error talking about. didn't have index action, added empty action see if problem , nothing changed. routes.rb ~/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/refinerycms-portfolio-289b85b18771/ gem below
commenting out portfolio gem in gemfile , running bundle install same error because autogenerated code (referring stuff .rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/refinerycms-0a37f8090278/) still getting executed (i use git version control , make clean clone of project before these changes , has same problem because autogenerated code not part of version control).
- gem uninstall of refinery-photo-gallery, refinerycms-page-images , refinerycms-portfolio gems thought might causing problem
- i moved gems in ~/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/ out of directory see if bundle install regenerate fresh, clean gems nothing changed.
none of these ideas has made difference. if clarification needed please let me know. i've been stumped on week , googling skills failing me. appreciated!
~/.rbenv/versions/2.2.1/lib/ruby/gems/2.2.0/bundler/gems/refinerycms-portfolio-289b85b18771/routes.rb
refinery::core::engine.routes.draw # frontend routes namespace :portfolio, :path => refinery::portfolio.page_url root :to => "galleries#index" resources :galleries, :only => [:index, :show] end # admin routes namespace :portfolio, :path => '' namespace :admin, :path => refinery::core.backend_route scope :path => 'portfolio' resources :galleries, :except => :show :children, :on => :member post :update_positions, :on => :collection resources :items, :except => [:show] post :update_positions, :on => :collection end end resources :items post :update_positions, :on => :collection end end end end end
gemfile
source 'https://rubygems.org' # bundle edge rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '4.2.3' # use sqlite3 database active record group :development, :test gem 'sqlite3' end # use scss stylesheets # use uglifier compressor javascript assets # use coffeescript .coffee assets , views # see https://github.com/rails/execjs#readme more supported runtimes # gem 'therubyracer', platforms: :ruby # use jquery javascript library gem 'jquery-rails' # turbolinks makes following links in web application faster. read more: https://github.com/rails/turbolinks gem 'turbolinks' # build json apis ease. read more: https://github.com/rails/jbuilder gem 'jbuilder', '~> 2.0' # bundle exec rake doc:rails generates api under doc/api. gem 'sdoc', '~> 0.4.0', group: :doc # use activemodel has_secure_password # gem 'bcrypt', '~> 3.1.7' # use unicorn app server # gem 'unicorn' # use capistrano deployment # gem 'capistrano-rails', group: :development group :development, :test # call 'byebug' anywhere in code stop execution , debugger console gem 'byebug' # access irb console on exception pages or using <%= console %> in views gem 'web-console', '~> 2.0' # spring speeds development keeping application running in background. read more: https://github.com/rails/spring gem 'spring' end # added matthew, thin server gem 'faye' gem 'thin' group :assets #gem 'sass-rails', '~> 3.2.3' gem 'coffee-rails', '~> 4.1.0' gem 'sass-rails', '~> 5.0' #gem 'coffee-rails', '~> 3.2.1' gem 'bootstrap-sass','~> 3.1.1' gem 'uglifier', '>= 1.3.0' #gem 'uglifier', '>= 1.0.3' end gem 'twitter-bootstrap-rails' gem 'refinerycms', git: 'https://github.com/refinery/refinerycms', branch: 'master' #gem 'refinerycms-page-images', '~> 2.0.0' gem 'quiet_assets', group: :development #gem 'refinerycms-photo-gallery', '~> 0.1.0' # add support searching inside refinery's admin interface. gem 'refinerycms-acts-as-indexed', ['~> 2.0', '>= 2.0.0'] # add support refinery's custom fork of visual editor wymeditor. gem 'refinerycms-wymeditor', ['~> 1.0', '>= 1.0.6'] gem 'refinerycms-portfolio', github: 'refinery/refinerycms-portfolio', branch: 'master' # default authentication adapter gem 'refinerycms-authentication-devise', '~> 1.0'
looks bug in portfolio/images plugin, tried bundle update , updated code worked charm. <3 refinerycms contributors
Comments
Post a Comment