Depending on your hosting provider, in a shared hosting environment you might have to add
ENV['RAILS_ENV'] ||= 'production' to the top of
config/environment.rb to ensure that the application runs in production mode.
Some shared hosting providers don’t provide compilers because they are very sensitive about system resources. You may still be able to compile the itex2MML library for the web host (target machine) if you have access to another machine (build machine) of the same architecture (i.e., processor type: i686, x86_64, etc.) that is running the same version of glibc. This procedure allows for the target and build machines to be running different versions of libruby. If they are running the same version, you may skip to step 2.
Copy the equivalent of
/usr/lib/libruby.so from the target machine to the
itexToMML/itex-src directory on the build machine. Edit the Makefile by adding
-L. to the build command for the
ruby: itex2MML_ruby.o y.tab_ruby.o lex.yy_ruby.o $(RUBY_LD) itex2MML_ruby.o y.tab_ruby.o lex.yy_ruby.o -L. -L$(RUBYLIBDIR) $(LIBRUBYARG) -o itex2MML.$(DYLIB_EXT)
-L. tells the compiler to look in the current directory for libraries. It will find the Ruby library from the target machine there.
Instead of copying the library, another option is to link against
libruby-static.a instead by changing
-lruby1.8-static on Ubuntu edgy).
Now build and test the library on the build machine:
make ruby && make test_ruby
You will need two files from this process: the shared library,
itex2MML.so, and the ruby wrapper,
libdirectory of your Instiki installation on the target machine. Test that the library works by running
Now, you should have itex2MML support for Instiki on the target machine.
Using SQLite is great for local installations, but if you have access to a MySQL server, you may choose to use that instead. Create the database and modify
config/database.yml as follows, using the values for your host:
production: adapter: mysql database: your_db_name username: your_db_username password: your_db_password host: 127.0.0.1 port: 3306
ruby bundle exec rake db:migrate
to create the tables. For more information (including an easy migration path from SQLite to MySQL), see the MySQL page.