In my Ruby on Rails application, I am using xsltproc command-line tools. These work on my development machine, but are not working on Heroku, the deployment platform I am using. I asked Heroku support a question about it, and here is what they said:
Hi– can you try compiling xsltproc as a standalone static binary and deploy that as part of your application?
If I knew what that meant, I probably wouldn't be here. I am guessing it means make a file with all the xsltproc code and call that for the xsltproc commands. I have no idea how to do that. Can anyone help?
If anyone wants to use xsltproc command-line tools on Heroku, don't do it. I was able to use the Nokogiri gem, along with the built in XPath functions to do everything I need.
Related
Actually when we write codes in Java, we use Maven for building java code similarly Adv Java uses Gradle and .Net code uses Ms Build. But when we write Ruby codes, how can we built that code.
Is it possible to deploy the code directly to ROR ??
Ruby is a interpreted language.
An interpreted language is a type of programming language for which
most of its implementations execute instructions directly and freely,
without previously compiling a program into machine-language
instructions. The interpreter executes the program directly,
translating each statement into a sequence of one or more subroutines,
and then into another language (often machine code).
While there are quite a few IDE's that make it faster or easier to write ruby code there is no compiler step.
Is it possible to deploy the code directly to ROR ??
The question is totally nonsensical since both Ruby on Rails and your application code are interpreted on the go.
You can run ruby code with the Ruby command:
ruby somefile.rb
Or an interactive prompt with irb.
You run RoR applications with rails server and an interactive console with rails console.
While Capistrano is a build tool it does not actually compile code. Rather it just automates the steps of deploying an application, and is an optional dependency usually used when you are deploying via SSH or FTP. Its better compared to other tools in dynamic languages such as Grunt (javascript) or Apache Ant. Capistrano is seldom used when deploying to SAAS platforms such as Heruko.
You need to built code in Java and .Net as these are compile type languages whereas Ruby is an interpreted language ie it will check the syntax errors or any other message whenever the code/file is being run explicitly.
While you can run the ruby file using
ruby filname.rb
Is it possible to deploy the code directly to ROR ??
To run your code locally using
rails s
And deploy the code using capistrano or other tools to some other server.
Hope it clarifies your question.
I hope this question is suitable for this forum, I'm still learning what's deemed fit and what isn't. Anyway here is my question, a lot of places seem to state I need to install homebrew on my mac to install rails, do I really need to and what benefits does it offer to do so and for the development environment?
This question is pretty bad but I remember when I started programming that I had a similar question, so here we go:
How do you install stuff on your computer? Obviously you use the Mac App Store if you want something from Apple, and if you want to install Chrome just go the Google Chrome website etc.
But when you want some kind of programmer tool, let's say a compiler. How do you install this? Either you go to their website, download a tarball with the source code, compile it from scratch and bind the necessary environment variables. Or you are unlucky and the compiler has a bunch of dependencies so you have to download them first.
Then some geniuses thought that "Oh damn, that's a pain", so instead they created so called package managers, so now when I want Rails on my computer, I just installed it through the "gem" ruby package/dependency manager.
So you can install rails through the command "gem" (just google "ruby gem") and you'll see what it is, but I advise you to if you want to have a nice development environment where it's easy to install and uninstall stuff, use brew or macports.
Title says it all.
If I understand correctly, the Heroku VM environment provides some built-in binaries and then additional ones can be provided in a custom build pak.
Trial (by building a little test app) and error (by having the build fail) is the only way forward so far. Surely there's a better way.
I have read the Heroku docs and looked in obvious places in the Ruby build pak source. No list.
My immediate aim is to determine if a Rails app that requires GD2 graphics (the gd2-ruby gem) will build without a custom build pak. But the general question of binaries availability comes up again and again.
Run heroku run bash, and get a shell in a plain dyno. Then list all rpms installed by invoking dpkg --get-selections, as for example here: https://askubuntu.com/questions/17823/how-to-list-all-installed-packages or here: http://www.howtogeek.com/howto/linux/show-the-list-of-installed-packages-on-ubuntu-or-debian/
I have a Rails project that is going to be using OpenCV, and it depends on a certain version of it (2.4.6.1).
I'm looking for deployment advice. The Ubuntu opencv package is an earlier version and therefore not suitable.
I can see a number of possibilities, but I'm trying to think of what will work best.
Just write it up in a README and expect people to follow it: download this, apt-get that, etc...
Add opencv, tagged at the version we need, as a git subtree, and include a Rake task to build it.
Write a script to download and compile the needed code.
Something else ?
None of them seem all that great, to tell the truth.
Can your application be made to work with OpenCV 2.4.2? That is available in Ubuntu 13.04, and you could request it be backported to 12.04. If not, you could update the source package to 2.4.6.1 (which would require learning about debian packaging but might not be too difficult since you would be modifying an existing package instead of starting from scratch), upload it to a PPA, and instruct your users on Ubuntu to install OpenCV from there. You could also package your rails application and put it in the PPA, which would make overall installation even easier.
I am new to vim, and I just followed this setup tutorial, but something went wrong. I am a ruby developer and I am not getting a a ruby highlighting syntax. I have installed janus, before with pathogen I had syntax highlighting but not know.
Also I am using the solarized theme the guy suggested but there is no difference now (in color) between folders and files in my terminal when listing a directory.
Could somebody tell me if I can install pathogen with janus? WIll this break my vim?
Thanks!
Don't install anything (and don't install Janus).
Run $ vimtutor in your terminal. As many times as needed (and don't install Janus).
Once you feel ready to use Vim for day-to-day coding, install MacVim which is built with a better feature set than the default Vim. It comes with a CLI executable so you can use it in your terminal and in tmux (and don't install Janus).
Install the vim-ruby package for better, more up-to-date Ruby support (and don't install Janus).
Don't install Janus. This thing is a pile of crap that will make your life overly complicated, hook you on plugins that may or may not be the best for you needs and prevent you from actually learning Vim properly in exchange of an artificially flattened learning curve.
Decide for a plugin/runtimepath management solution (VAM, vundle or plain Pathogen) and choose your plugins yourself according to your needs (and don't install Janus).
If you have problems with Solarized, take a look at their issue tracker and their wiki. It is fragile and you need some work to set it up correctly (and… you know the rest).