Ruby: Lightweight web server - ruby

I'm developing at Ruby on Rails. It's good framework and etc., but now I need to make one little promo-site. It can be done at simple HTML, but should have content at two languages.
It will be very pretty if I can use some super-fast and lightweight framework. Something like Ruby on Rails, with ERB-templates, partials and YAML-files for internationalisation, but without ActiveRecord and blah-blah-blah. Any ideas?

If the website can be done using static HTML, but you want the comfort of templates and YAML internationalization, you might want to take a look at Middleman, which does exactly that. :)

Sinatra? Renee? These are the small frameworks that are great for this kind of job.

Mini-rails can also be a good solution to your problem, especially if your website might grow one day or another

Related

Create WordPress plugins using Ruby

I would like to create a WordPress plugin using Ruby (language). I understand that PHP is the primary server-side language used with WP. I don't know PHP, but know a great deal about Ruby, which is also a server-side language. Can anybody help?
based on previous experience and some reviews of similar questions on SO, there are ways you can call Ruby from within your Wordpress code. The simplest and elegant solution I've seen to this is here : http://code.tutsplus.com/tutorials/build-a-custom-api-to-connect-wordpress-with-ruby-on-rails--cms-21189
There are loads of arguments for going with both solutions at the same time, but probably the easiest read is this https://bernardic.ca/2012/07/08/rails-vs-wordpress/
Enjoy!

Build an app with marionettejs with requirejs?

I have used backbone boilerplate on the past
https://github.com/backbone-boilerplate/backbone-boilerplate
I want to use marionette on my next project and I have found this
https://github.com/BoilerplateMVC/Marionette-Require-Boilerplate
My question is if it's a good idea to go with the marionette boilerplate or start form scratch.
As an aside, I'd like to suggest you give Yeoman a shot for scaffolding your first Marionette app. Yeoman works via what are called "generators", and provide much more than the the above Boilerplate MVC can offer you (Chai and Sinon for testing, Bower for client-side package management, etc...). Plus, Addy Osmani, who runs backbone-boilerplates is one of the heads of the project. Check out generator-marionette here.
I haven't used BoilerPlate, but glancing through it, it certainly seems like a valid approach to writing Marionette apps. If you're just getting started it will certainly help you see how the various pieces are supposed to be used. One gripe I've got is the folder structure. I prefer to break my applications down into modules, and then add models, collections, views, etc under each module. But this will certainly get you up and running quick, and there's nothing stopping you from customizing it to suit your needs.
I agree with others here: it is a useless limitation to imitate a folder structure that follows the 'old mvc model for server-side code'. You will remain more flexible further down the road if you think of your application strictly as completely self-containing modules, i.e. they contain their own controller/router/views/collections/templates etc. You can have a separate folder structure for shared code that is not a module, although anything can be made a module :)
Regarding boilerplate code and generators: i think in the beginning you should actually NOT do it, because you won't understand what you're doing. But that's just my personal opinion.

Simple Compass+HAML webserver

I love compass (SASS) and HAML. I've been using staticmatic for building static web pages. Staticmatic seams outdated (no updates, bugs). What are the alternatives?
What I would like:
$ preview .
> Server started ad port XXXX
> Now you can use Compass and HAML
:). So... no configuratio, no directory structure, just haml and sass files.
I am currently using Compass/Sass/Haml with middleman. https://github.com/tdreyno/middleman It is very easy to use, and runs a sinatra in the background so you can see your changes live in your web browser.
After you are done editing and previewing your markup it builds static HTML from your stack of Compass/Sass/Haml. See https://github.com/tdreyno/middleman/wiki for usage.
This requires no conf at all except to tell it which templating engines you are using at setup so I think it is exactly what you are looking for.
You can try jekyll. I think it doesn't work with sass and haml out of the box but you can look at plugins
Don't forget Nanoc. While it is a little involved, it has some slightly more powerful features than StaticMatic. It does depend on a directory however. :/
There are just a ton of static generators around, most of them in Ruby. I'm planning to use Frank for the next few static projects.
It uses Tilt to support a ton of template engines
It has a concept of layouts, which go in a separate layouts folder, and templates can have a metadata header, but other than that it's very minimal.

Codeigniter template library build or download?

i am pretty new to CI. been looking at few template libraries but found either they have much more than I need or not enough.
so i started to build my own. is there anything i should keep in mind? in terms of security? caching? etc etc
thank you
A template library is pretty simple to create and unless you have a need for all the stuff that one of the many available have I would just roll your own. With that said I tend to use the one by Phil the most as it matches the closest with the way I do things.

Object Oriented Design with Ruby

What are some of the best practices for OOD with Ruby? Mainly, how should files and code be organized?
I have a project that uses several classes and files and I am just wondering how it should all be organized, grouped and included.
It sounds like you're asking which pieces go in which files.
Is your project a Web application? In that case you would most likely use the system of organization imposed by your framework (Rails, Merb, Sinatra, etc.)
Other kinds of projects also have their own typical structure that you can just follow. E.g. gems are usually set up in a certain way.
If it's a console app, there's no strict rule. Usually people put no more than one class or module in a file. You could have one main file that requires all the others.
Standard OOD concepts apply to ruby. For specifics, maybe this guide will be helpful:
http://www.rubyist.net/~slagell/ruby/oothinking.html

Resources