TexLive on Heroku etc. - What are my options ? - heroku

I am trying to build a Rails application that would internally invoke LaTeX
to stitch together TeX files to generate documents on the fly. Not necessarily PDF.
Just TeX -> DVI -> PS would do it for me.
My best guess is that I would need to host 2 separate code-bases, one for
Rails code ( the standard $RAILS_ROOT ) and (possibly) a separate directory structure
for hosting the TeX files ( which is also code in a way ). And as I see it,
the Rails app would make system calls to LaTeX (latex <options> <files>)
on the TeX files to do what I want it to do
I was wondering, therefore, if you guys could help me decide what the
best hosting option could be for the above setup ( unless, you think that
the setup itself should be different )
I know that something like Heroku would allow me to host the Rails bit easily.
But as far as I can tell, their servers do not have full TexLive installation which I need.
I have asked them if they could install TexLive on their servers. But assuming
they don't entertain one off requests, what are my options ?
Do I then need to recreate my local setup from scratch on something like Amazon's EC2 ?
Any pointers on available options and the tasks they would entail would be most
helpful.
Thanks
Abhinav

I think you should be able to make it work on Heroku but you may need to write a custom buildpack which includes/installs the latex binaries:
https://devcenter.heroku.com/articles/buildpacks

There is already a buildpack for TeX and it works for me perfectly:
https://github.com/holiture/heroku-buildpack-tex

Related

how to install python for using d3 charts at windows

I have to use d3 graph at my web page. I never worked with d3. That's why, I'm facing some problem using it. Basically, I've to work at dropbox folder. So, my clients can see the worked file locally at their browser. Consider, I put a d3 chart at file.html file and my folder structure is like this
D:\Projects\Dropbox (Company)\MyName\FolderName\file.html
But, I saw that to run and see/show d3 examples I need run web server or run a python server. So, I've downloaded Python 3.4.1 and installed by double click. It's installed at this directory: C:\Python34
After that, I tried to follow d3's documentation for installing python server. So, I opened my cmd and type:
python -m http.server 8888 &
But, it gives me this error:
So, my question is:
How can I install python web server?
After installing that web server, is it possible see the d3 chart via this link: file:///D:/Projects/Dropbox (Company)/MyName/FolderName/file.html or I've put my files inside htdocs and run via http://localhost/folderName/file.html (I don't want to put files inside htdocs. It'll be tough for my clients see the output of the files directly from their pc)?
If it can't be seen without putting inside htdocs folder, I may find solution for running d3.js locally without installing any additional software/server(though I've found this type of solution for some d3.js chart but not for all). Thanks in advance and please don't mind if it's a lame question. Basically, it's my first day working with d3.js and I'm only ameture level skilled with javascript and jQuery.
OK, browsers are designed with security in mind, by default they don't let scripts go and grab a file from anywhere for very good reasons. They allow you to grab a file from the server or through requests. So to share your work with your client you will either need to use a hosting service - I would recommend bl.ocks, design your visualisation so it doesn't require any external data or provide instructions on how to disable browser security. You can read more about this here, here and here.
On python, in many cases python is already installed on people machines, so running a server from python shouldn't be an issue. All you have to do (on a windows machine) is launch your command prompt navigate to your directory and start your python server. Then open a browser and navigate to the localhost. Please note that python needs to be set as an environmental variable (i.e. your system path), the python documentation might help you here.

OS X package with multiple domains

I am looking to create a mpkg that targets installations to both the user home directory and the system volume (for example, plugins in both ~/Library/ and /Library/).
I can only seem to be able to do one or the other (not two together). I also have found virtually no documentation on this subject. Installation domains seems to be glazed over.
Can anyone shed light into this? I have been trying to accomplish this in both PackageMaker.app as well as Packages.app.
You probably need a custom postflight script to handle the user specific plugins.
I recommend the luggage to roll your own pkg with a makefile.

Scripting Trac installation on Windows

I'm currently working on some R&D for improving the process and practice that we approach development.
As a first iteration something I'd like to do is develop an easy way to set up a project e.g. Run an ant script that will, when provided with a project name etc,
Copy a template in svn
Create a database (if needed)
Automatically update the connection strings in config/properties files
Create an instance of trac
Email the user with all this information
I'm fine with the first 4 but I'm struggling to get a good process together for setting up Trac.
I've done it manually before but found it incredibily difficult.
Does anyone know of such a set up script or have any tips on doing this?
Cheers,
Rob
Have you looked at bitnami?
See the Trac bitnami bundle for example

Component Creation How-to

I want to create a component that will allow me to install other components, modules, and plugins that i personally use all the time. I will need to be able to change these modules, components, and plugins at anytime but updating the components and etc.. that i use and be able to add more plugins and etc as well. I would like this Component because it takes too much time to install them all individually and on multiple sites as a web designer. I also would need to have some instruction on how to add subtract plugins, modules, components, and etc. I am ok with not a total integration i would like to be able to just host the install file on my server with a link to my server where the file is located.
If anyone can help with this please do.
this is not a direct answer more of a personal workaround ( I do this on local host).
I create a site for example Joomlabase, when it asks for DB name call it Joomlabase then add my extensions
then when I need a copy
1) copy and paste the folder named Joomlabase in Windows Explorer to a new name.
2) go into Phpmydmin copy the joomlabase DB to the same name as the new site name.
3) DO a search and replace of Joomlabase to new site name in config.php file (there should be 5 changes) and your done.
For me it saves a lot of time because in admin alone I use at least 12 different extensions
There is a Joomla admin component called "Akeeba". It creates a snapshot of your files and database which you can easily deploy to another server. I use it often when pushing a new site to production from a QA server.
http://www.akeebabackup.com/download/akeeba-backup-core-for-joomla/index.html
Your question is way too broad, and the simple answer is that it would take much much much more work to maintain this 'super component' than you are currently spending simply installing the extensions separately when you need them.
The other answers here don't answer your question, but they provide some decent solutions to your actual problem.

TYPO3 extensions and symlinks

Can I create a symlink to the local extension from aonther project folder? I have a common local-server and i need to implement same extension on all local project-installations. I tried to put the symlink, but some times i do not get expected output. I get it only after clearing the cache of that perticular project.
Your scenario is a common one I guess. But as Omar said, linking to the same code base of the extension through several typo3 instances is not a good practice.
But we have the same structure as yours, we realize this through SVN. All of our projects got a SVN repository and common extensions have their own repository. Through svn:externals the extensions are linked into the concrete project. This has the advantage that you can change the extension in the concrete project and after committing all other projects (that do have to update from svn though) contribute from it. I Think this would fit your needs, too.
If I understand your question correctly you have several Typo3 sites on the same server and want to share an extension between them using a symlink. I don't think that is a very great idea because many extensions use tables and every site normally has it's own database so you would have to do a lot of tinkering to get that to work.
Instead you could make all the modifications to the extension files in the typo3conf/ext/extension_name folder and then export the extension to a t3x file (Ext Manager in the Backend). This t3x file can be installed as a extension (Import extension) on all your other sites.
If you extension does not use a database and you are planning to make frequent changes then I guess you should be able to make that work (the symlink). Otherwise I recommend you use the first approach I described.
I have not tried this, but you should be able to install extensions globally in Typo3. What this means is that the given extension is placed inside '(typo3_src/)typo3/ext/' instead of 'typo3conf/ext/', presuming both sites use the same Typo3 Core/Source (and thus typo3_src is a symlink to the location of the core).
You can enable installing global extensions via the Install Tool. Once inside the tool, click on 'All Configuration', then search for allowGlobalInstall. Or put the following line into your localconf.php:
$TYPO3_CONF_VARS['EXT']['allowGlobalInstall'] = '1';
At last, but not least, you need to make sure the 'typo3/ext/' directory is writeable.
Hope this will be to some help. If you have any further questions, let me know :)
As Björn mentioned, I'd sugegst to install them globally. Mind you, updating the source will require to move the extensions accordingly..
As for "expected output": be aware that the code in these folders is cached in various ways (mainly page content and config settings), and hence not always run. This is the reason a change done from "outside" the current installation is likely not to propagate to your output without clearing these caches (as you have observed).
When you actually install an extension via the extension manager, the cache should (if correctly configured) be cleared (interested parties may search for clearCacheOnLoad in class.em_index.php to reveal a clear_cacheCmd('all')). There is a small checkbox, which is normally checked, during the installation process to accomplish this.
Omar's first approach is therefore, as I see it, the more easy way to get "expected output" and less jumbling around with global extensions.

Resources