I cannot for the life of me figure out why this isn't working!
I'm working through the railscast for mercury and I can't get the editable area to show up.
gemfile
source 'https://rubygems.org'
gem 'rails', '3.2.13'
gem 'mercury-rails', git: 'https://github.com/jejacks0n/mercury.git'
gem 'sqlite3'
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
routes
MercuryRelational::Application.routes.draw do
mount Mercury::Engine => '/'
root to: "pages#show"
show page
<h1>Show Page</h1>
<div id="page_content" class="mercury-region" data-type="editable"><%= raw(@page.content) %></div>
url to the show page is
http://localhost:4002/editor
still there is no editable blue box around the text.
However! I do get an error in the javascript terminal though "Uncaught TypeError: Cannot read property 'konqueror' of undefined"
Please help!
I've found the problem and have solved it in the following way!
It turns out that mercury is using the jquery method jQuery.browser
, which is deprecated
in the jquery 1.9 upgrade.
I'm using gem 'mercury-rails', git: 'git://github.com/jejacks0n/mercury'
so this will probably get fixed and I don't know how else to document if this solution is relevant to you, but this is the latest commit I'm using from the mercury gem, d065b2c31b895af03749254b521f0c0ee18fb25a
.
Including this gem solved the issue for me.
gem 'jquery-migrate-rails'
and don't forget //= require jquery-migrate-min
in the application.js file, after requiring the other jquery files.