I think there’s an issue with Rack 3.0. See if this change to your Gemfile helps
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
source "https://rubygems.org"
gem "sqlite3", "1.4.2"
gem "itextomml", ">=1.6.0"
-gem "rack", ">=2.0"
+gem "rack", "~>2.0"
gem "thin"
gem "after_commit"
gem "rubyzip", '~>2.3.0'
While there are a few new features, this is primarily a security release, to deal with an issue uncovered by Christian Sattler.
You will need to do a
ruby bundle install
to update some of the dependencies.
Just a tip: you don’t really need to wrap your SVG in a MathML equation. If all you need is to center the figure,
+--{: style='margin: auto; text-align: center'}
<svg> ...</svg>
=--
will suffice (and won’t generate the superfluous MathML wrapper).
(Even better, edit the CSS tweaks for your Web, to add a .centered
class:
.centered {margin: auto; text-align: center}
Then this could be abbreviated to
+--{.centered}
<svg> ...</svg>
=--
)
Just so we’re clear, Instiki takes care to uniquify the #id
s of the SVG fragments generated from Tikz source. If you want to generate the SVG yourself, then that responsibility falls on you.
Sorry. I guess I misunderstood what you are doing. Instiki allows the inclusion of Tikz source (either inline or via [!include ...]
). But that’s not what you are doing.
You’ve created two SVG fragments by some means or other. It doesn’t matter whether you put them inline or via [!include...]
. The source of your trouble is that #id
s need to be unique on a page, and your two SVG fragments have duplicate #id
s. Individually, they work fine; but put them on the same page and all hell breaks loose.
Fix your #id
s and you’ll fix your display problems.
This again, has nothing to do with Instiki, its support for Tikz or for SVG. It’s basic X(HT)ML.
I have pages with multiple Tikz-generated images. So I don’t know what your problem is. Perhaps if you porvided a link …
The problem isn’t on the browser end, but rather on the server end. Instiki is misinterpreting your browsers request for that file (which resides under public/svg-edit/editor/jgraduate/css/jGraduate.css
) with a request for a wiki page (in a web named svg-edit
). That’s not a problem I’m seeing on any of my Instiki installations. So I’m trying to figure out what’s “different” about yours.
Hmm. Looking more closely at your error message, I think this commit might fix your problem. Dunno what the source of the extra space is, but that seems to be the cause of Heroku’s complaints.
Do you have a Web named “svg-edit”?
Clearly you are trying to use the wrong Gemfile.lock
. The correct one (which you are supposed to rename from Gemfile.lock.heroku
) doesn’t have a “BUNDLED WITH” line in it.
Try following these instructions.
Hmm. Yes, it looks like the Gemfile.lock.heroku
was out-of-sync with the Gemfile.heroku
. I’ve updated both of them.
Actually, with tex2svg 1.0.12, the size of the Docker image has shrunk to 1.09 GB.
With the aid of this optional add-on, Instiki (and this forum) can process embedded Tikz code to produce SVG figures. Think of it as a non-WYSIWYG alternative to SVG-Edit. You can get the code from Github.
The easiest way to run it is as a Docker container. The Docker image is 2.14 GB, which is on the large side, but not as large as a full Texlive installation. Instructions for integrating it with Instiki are here.
Some more details would be helpful.
Are you using RubyInstaller?
Definitely should update those instructions for systemd
, which seems to have replaced init
in most Linux distros.
Can you access
http://127.0.0.1:2500/web_list
? If so, what are all the links on that page?
(Clearly, something got screwed up in creating your first wiki. If we can’t straighten this up, I’d suggest reinstalling.)
Edit: To be clear, a full reinstall is probably not necessary. A simple
kill <pid-of-instiki>
git checkout -- db/production.db.sqlite3
ruby ./instiki
will suffice to reset the database.
I assume you’re running on localhost?
In that case, you should be able to access the URL
http://127.0.0.1:2500/
If you have more than one wiki (“web” in Instiki’s idiosyncratic parlance), this will redirect to
http://127.0.0.1:2500/web_list
If you have only one web configured it will, instead, redirect to the HomePage of that web.
I would not expect the (ancient!) gem version of Instiki to work at all.
What you need to do is
git clone https://github.com/parasew/instiki.git
cd instiki
ruby bundle install --path vendor/bundle
Then, if all went well,
ruby ./instiki --daemon
Hmmm. That’s unexpected. You can edit the Gemfile
to replace the line
gem "nokogiri", '~>1.7.0'
with
gem "nokogiri", '~>1.6.0'
which should work fine.
Or you can install a more recent version of Ruby (current is 2.4.0; you have 2.0.0).
There are several options. The easiest is
![My former cat](https://golem.ph.utexas.edu/~distler/bree.jpg)
{: style="text-align:center;}
Do you use Firefox?
A GreaseMonkey script could provide that sort of customization (and more).
There are other extensions for using an external editor with textarea
s, which would be another way to get the sort of customizable editing experience you are looking for.
No.
Macros are not a feature of itex2MML.
The first reason is security: it’s very hard to protect against the (La)TeX equivalent of the billion laughs attack. This is, of course true of TeX/LaTeX itself, but it’s a much more serious concern when used in a web application (like Instiki, or this forum software).
The second reason is an implementation detail: in the preferred mode of use (as used in Instiki and in this forum software), a separate invocation of itex2MML is used for each formula. A macro defined in one invocation could not be “re-used” in another.
Now, neither of these would be incompatible with implementing a “global” preamble (whose content would be controlled by the website owner and not alterable by ordinary users). On the other hand, that would be rather less-than-useful on a public wiki (or forum), so there hasn’t been much user demand for such a feature either.
I guess a private wiki would be one use-case where it might be desirable …
Heterotic Beast supports any RDBMS backend that Rails supports.
The whole point of rbenv
(or rvm
) is to set up your paths correctly so that, when you type ruby
, you get the desired executable. I don’t know anything about Dreamhost, and didn’t really read the rbenv
installation instructions that you followed, but evidently they didn’t quite achieve the desired result.
OK. So let’s assume you’ve gotten that far correctly. cd
to your Instiki
directory and try
ruby --version
ruby bundle install
The first command should return the version of Ruby you’re using (hopefully 2.2). The second should run the included version of Bundler (as opposed to the one you installed via rbenv
).
rbenv
is certainly the preferred way to get multi-version Ruby support. So I would go with that, and target Ruby 2.1 or 2.2.
I think it would be better to start with a more recent version (≥1.9.3) of Ruby.
What are your options for that?
“… although if I want to run Ruby 2.1 or 2.2 I think I’m going to have to build it from source, which I don’t know how to do yet.”
Build Ruby from source? I don’t think you want to do that (unless you really have to). It would be better to have a known-working version of Ruby, so that we don’t have to debug possible problems in your Ruby installation as well (well, OK, technically we are already doing that, since your versions of Ruby and Rubgems aren’t totally compatible).
Instiki should work fine with Ruby 1.9.3, if that’s really the most recent version you have access to. We’d just need to modify a line in config/boot.rb
to take care your problem with Rubygems.
I’m sorry. I am quite confused as to your configuration.
In your first message, you indicated that
Now you tell me that progress was made by downgrading your Ruby version to “<2.0”?!?
That said, I sorta understand the error about Gem.source_index. The version(s) of Rubygems which came with Ruby < 2.0 had that method. Later versions do not. So there’s a monkey-patch in config/boot.rb
to supply the missing method for Ruby ≥ 2.0.
Evidently, you have the odd combination of an old (1.9.3) version or Ruby and a recent version of Rubygems.
Maybe you should start again with
Run ruby bundle install
and see what happens. If that fails, post your errors here. If it succeeds, but then ./instiki
fails, post your Gemfile.lock
, so we can see what got installed.
On the other hand, if you’re just using ASCII characters, you can replace [[:word:]]
with \w
on lines 263 and 267 of vendor/bundle/ruby/1.8/bundler/gems/maruku-aa33367fa89e/lib/maruku/input/parse_span.rb
and not run into any problems.