Looking for a good wiki platform for Rails - ruby-on-rails

I'm looking for a good wiki platform to work with RoR, I know mediawiki is great but its in PHP and I'd rather keep my code base in the same language if possible.

DHH (I think) wrote a simple wiki in Ruby several years ago called Instiki. I haven't used it in a while, but I'm sure the code is out there somewhere.
If you want an active project, there's something called Decko, which is a wiki in Ruby, but an unusual (and apparently successful) take on how to do a wiki. I've not used it, but all my poking at it suggests it's a very well-thought-out and useful approach. Find it at https://decko.org/

Here are list of wiki software written in Ruby and in other languages as well.
http://en.wikipedia.org/wiki/List_of_wiki_software#Ruby-based

Try the font of gem-ishness, ruby-toolbox.com
https://www.ruby-toolbox.com/categories/wiki_apps
I note the top 3 are all git-baseed, rather than database based, at time of writing.
I've used none, myself yet. So I guess we use number of download be a guide?

Related

Good documentation for writing Redmine plugins

I am currently developing some plugins for Redmine, and I must say, I'm a bit disappointed with the lack of documentation available on this subject.
Normally, If I am looking for explanations on classes/methods, I need to spend a consistent amount of time browsing trough the core classes, and striving to understand the code written there (It seems that some people forgot to document their code, unfortunately).
I've checked their forums http://www.redmine.org/projects/redmine/boards, and it seems to take forever in order for a question to be answered.
That's why I would like some advice regarding some good API documentation/books/forums on this subject.
I know this maybe too-late for the original question poster but might help someone else in a similar situation. Below links are for a total newbie (like me) to RubyOnRails but someone who's programmed before. You can pick and choose the relevant ones as per your skill level.
Understanding Redmine (functionality):
If you're not familiar with Redmine or administering other Issue Tracking Software Mastering Redmine book is an ok place to start. It's not very densely packed so it'll help only as a structured organization of information. If you want more dense information go through the documentation instead.
Understanding Redmine Plugins:
"Redmine Plugin Extension and Development" by Alex Bevilacqua has just been released (March 2014). It's available both in print and ebook formats from packtpub.
I'm going through the book myself as I need to customize/rewrite a plugin for Redmine.
I'm new to Rails/Ruby/Redmine myself. Though I'm from Unix/C++ background still getting to know the ropes of Ruby, Rails, Redmine via following books.
Understanding Rails:
I found the book Agile Web Development with Rails to be a good enough intro to Rails for programmers from other languages.
Note: Target audience seems to be Rails developers but it should be possible to get through that learning curve by browsing github redmine plugin repositories.
Understanding Ruby:
Programming Ruby (the PickAxe Book)
Understanding Ruby Metaprogramming idioms (used in Rails):
On the surface Ruby looks like most scripting languages it is the use of MetaProgramming and Dynamic nature of Ruby Object Model that allows making complex internal gymnastics invisible to newbies.
A single line of Rails code contains enough such tricks to fill a small book.
Fortunately such a book has already been written - Ruby MetaProgramming book in Pragmatic Programmers series. It's superb to come to grips with this Mixin based Dynamic MetaProgramming. Rails and Redmine use plenty of these tricks as hooks etc to get the work done.
Excellent Video on Ruby Object Model by Dave Thomas
Video on Ruby Object Model and Meta Programming
the better documentation is the codesource. One the Redmine's mainteners have almost all Redmine's plugin on github.
you can choose any plugin and see what is looks like. mostly it's about metaprogramming and alias_method_in_chain usage
As stated on the redmine wiki page about plugin hooks:
There is a list of valid hooks. But the best way to find them is to just have a look into the code to find the place you would like to extend and search for a call to a hook nearby.
It seems browsing through the core classes as well as looking at other plugins is the way to go.
I assume you already found all the documentation on the wiki related to plugins:
The plugin tutorial
The plugin internals page
The above mentioned page explaining hooks
And finally, the list of the currently available hooks (rake redmine:plugins:hook_list in order to get the latest list of the installed redmine version)
As to the reactivity on the forum, you may try asking a question on the forum of chiliproject, the recent fork of redmine. Not sure though how much of it has already changed.

How to make a pluggable rails app

Basically, I would like to write a rails 3 app that
is embeddable in other rails 3 apps (basically some routes, a controller, and some views, no persisting models)
works standalone
can be bundled up into a gem and be launched from a command (this one is more a nice to have)
From what I have read, rails engines would totally solve my problem. The vast majority of what you get when you google it is either people complaining about a lack of documentation, or someone building a plugin, not really a pluggable app. Could anyone point me to better documentation/screencasts (even books if nessicary)
Thanks a bunch
Matt, I'm working on a rails forum engine and I had to figure a lot of this out so I extracted the foundation into a detailed example that covers a lot of common needs. It's generalized so you can easily adapt it. I don't have detailed documentation yet but I link to the sources that I used to figure this out, and I'm happy to answer questions about my source. Check it out:
http://keithschacht.com/creating-a-rails-3-engine-plugin-gem/
An Engine is really what you need and totally designed to meet your reuirements.
Engines actually work a lot better in Rails3.
A lot of the complaints from previous versions of Rails have been resolved in the latest version. I have used engines quite extensively in Rails 2.x and not found them to be all that bad to be honest.

Must know Ruby on Rails + Ruby plugins

I'm fairly new in the Ruby + Rails scene. Although I have a very strong understanding of design patterns, data structures and algorithms - there's a ton of "must have" plugins that I haven't had a chance to run into yet. There's things for migrations, resource controllers and a myriad of other plugins that make developing for these platforms significantly easier.
Would anyone be kind enough to share links for some of the most commonly used ones that every savvy Ruby or Ruby on Rails developer knows about. Something that's so important, that it might even be considered to be merged into the core at some point.
Hope that's appropriate for this forum. I surely think it is.
The Ruby Toolbox is another invaluable resource for Ruby and Rails developers
Here is the link for rails top rated plugin.
http://agilewebdevelopment.com/plugins/top_rated
You can find all top rated plugin at github.
Example:-These are some most usable plugins
http://github.com/thoughtbot/paperclip
2.http://github.com/mbleigh/acts-as-taggable-on
3.http://github.com/binarylogic/authlogic
RailsGems.org looks like it will be a useful site.

Ruby On Rails Web Application Development From Scratch?

Background
I am interested in getting to grips with some Ruby On Rails. I've got 4 years experience programming in C#, ASP.Net, ASP.Net MVC, SQL Server and more recently Silverlight etc. Obviously I've got a pretty good understanding about the various implementation routes that you can go down when writing web applications using C#, the issue is that I have literally no clue about Ruby On Rails, other than that Ruby is an awesome pure object oriented language and that Rails is a very quick way in which to build web applications using Ruby.
What I'm After
So essentially I'm after a session that fills in the blanks, and helps me to understand the various ways of building web applications using ROR. On top of this, i've found a few tutorials but they seem to be quite vague, so any documentation/samples would be very handy to help get me started.
More Detail
Popular IDE'S to use for development (I've heard RubyMine is good from JetBrains).
Possible database implementations to use (I know MySQL is an option but which version?)
Is HTML/CSS used to style the web apps?!
Interface plugins if used?
General route to producing a highly Web 2.0 site that encompasses a fantastic user experience and a beautiful interactive interface.
...You get the idea, I just need a bit of guidance getting clued up.
Help greatly appreciated :-D
I'd highly recommend starting by reading:
Programming Ruby (also available online)
Agile Web Development with Rails
You should start with the first one, but don't read it all the way through. Once you get the basics of Ruby down, you can switch to the Rails book, but feel free to switch back and forth as you get more familiar with both Ruby and Rails.
The books are both very well written, and they're actually fun to read as far as technical books go. They do a great job of explaining the basics to a total newbie and also really digging in deep. You'll have all of your initial questions answered within a few hours.
When I tried to get into Rails, I bought this Rails for .NET Developers. It was quite useful to get going. After that, the most value I found was watching railscast videos.
For an IDE, I use Netbeans.
Different people learn different ways, but one thing I find to be very helpful for getting a real "feel" for Ruby on Rails is screencasts. The Rails site has a whole section devoted to screencasts. For example, with the 15-minute-blog video, you can actually watch someone work on the blog app and see all the steps along the way. It's not necessarily more informative than, say, a book, but it can be easier to grasp when you're actually seeing it.
The official Rails Guides are kept well up to date -- begin with the Getting Started guide, Railscasts provide quick how-tos on lots of common tasks, and the Agile Web Development with Rails (3rd Edition) book is excellent if you want to sit down and read how it all works.
There's also tons of sample code on GitHub, where you'll find just about all the plugins available as well as lots of well-designed Rails apps that will show you all the best practices.
Regarding specifics you asked about:
Many Rails developers don't bother with an IDE (they just use text editors such as TextMate on the Mac). MySQL is popular for production but for local development, Rails is set up to use SQLite, which is quick and easy. Many developers are moving to a NoSQL datastore such as MongoDb because development is quicker without schemas and migrations. You'll use HTML and CSS but you may use Haml to abstract your HTML templating. For an interactive "Web 2.0" site (as you ask) you'll want to be become familiar with jQuery and CoffeeScript.
You asked the question back in October 2009 but I'm sure other people will continue to want suggestions for the best way to get started with Rails. I hope you've already become a Rails ninja!
i started ruby on rails a few days ago using http://ruby.railstutorial.org/ruby-on-rails-tutorial-book by Michael Hartl. so far so good.
This is my experience, I'm at the stage where I can build simple apps. I am comfortable with code, at least to go to the right sources.
Hartl Tutorial ... go through this at a steady pace, just to understand the overall basics. No way you can absorb everything there.
Why's poignant guide is great to understand how to read code through a story, making things enjoyable and memorable.
Agile guide to rails. This put eveything together, I went through the exercises but stopped near the end. I read what I thought I needed to know how to build something my work would use.
Using railscasts to supplement my app building.
I would recommend as resouces to use apis, irc #rubyonrails, and stack overflow. You would be surprised how people contribute and help you through problems you encounter.
Re: IDE
Most Rails developers use VIM. Or at least the better ones use VIM.
It's more powerful than an IDE. I know and use at least 5 languages and VIM works well for all. I use YADR. If you were with a team, sometimes using VIM or Emacs or Geanie are your best options.
Re: Books
You should read a Ruby book before anything. And by read, I mean, try the examples.
The best book I've read on Ruby on Rails is probably Ryan Biggs' book.
Engineering Long-lasting software would be a good book focused on teaching you some Ruby fundamentals for practical reasons.

Should I create a blog in rails or use something that already exists?

In my next rails project I'm going to need blogging functionality. I'm wondering whether anyone has any good suggestions, or should I just roll my own? (Probably not in 15 minutes)
I think the most important feature will be to display code samples elegantly.
How's your free time?
Five years, that's how long that little idea took. Plus 2 years of adding bells and whistles. And that, folks, is why I'm giving in and using a blog host. Because I have lots of ideas, lots of things to say and to explore, but only a few dozen years left at best. I can't afford to go chasing every 5-year idea that springs to mind. After due consideration of the crap web frameworks and crap blog packages out there, I decided that I don't want to spend my next 5 years implementing my vision for a decent self-publishing system. Someone else can do it.
http://steve-yegge.blogspot.com/2006/03/blog-or-get-off-pot.html
It's a classic build-versus-buy (or, in this case, download for free) decision isn't it?
Write up the feature set of what you are looking for.
Survey the offerings out there to see how close a fit you have.
For the one or two products that is the closest fit, evaluate whether or not it would be less effort to write your own solution or customize the offering to do what you need.
If all you need is a blog site, then this is a no-brainer. Use WordPress and that's it.
If there are other features for this app and blogging is just one of them, then consider writing an app around WordPress. It is just a PHP application using MySql after all.
If WordPress has features or does things that you don't want, then maybe you do need to roll your own.
If the most important feature for this site is that it is to be written in RoR, then roll your own or find a RoR based blogging app as WordPress is not written in RoR. I haven't really done the homework on this but I would imagine that getting PHP and RoR to share session state would be a time consuming hack.
Rolling your own blog is a great project (and quite fun too!), but for practical usage, using something pre-made is going to be more secure, have more cool features, etc. etc. Unless you're incredibly dedicated, you'll probably end up cutting corners and end up with something that isn't quite what you want.
Despite being a Rails guy myself, I'm a huge fan of Wordpress. If you're looking for Rails-based blog engines, I've had luck with Mephisto, although the documentation leaves something to be desired. Radiant CMS is another CMS/Blog system that might be worth looking at.
A lot of Ruby/Rails developers have actually gone the route of using static website/blog generators. This has a few advantages. First, the pages are static HTML with no dependency on a database. This means they can be served by your front-end Web server (Apache, Nginx, etc.) faster than if they were to go through Mongrel, Thin or Phusion Passenger. Secondly, the pages will be easier for search engines to index. Finally, and probably most importantly, you can easily version control your posts using Git (or your favorite SCM)
I switched my blog over to a static model after development on Mephisto seemed to stall. I am using Tom Preston-Werner's Jekyll and Disqus for the comments. Works great. Give it a try!
If you are just looking for a project, then building your own blog engine is a good start.
Personally, though I have been a full-time Rails developer for the past 3 years, I still use and recommend Wordpress for myself and others.
If the project is to write a blog, don't roll your own. There are plenty solutions out there that will solve this problem for you while you worry about pumping out great content.
You will end up spending to much time futzing with the little things that don't really matter.
Probably there are tons of those.
For example, Rastafari, or Enkiblog.
In my next rails project I'm going to
need blogging functionality. I'm
wondering whether anyone has any good
suggestions, or should I just role my
own? (Probably not in 15 minutes)
I wouldn't recommend rolling your own blog system. You should look into using Radiant CMS with a blog extension.
I think the most important feature will be to display code samples elegantly.
For this I can recommend looking into SyntaxHighlighter.
All depends on your goal:
If it is for learning purposes and it's for fun, code it from scratch. Also, try to add new functionality that you will not find in current blogging platforms. For example, make in a way that is easy for a developer to blog tutorials or screencasts.
If it's for a client or just to blog, use wordpress. You can have your site in ruby and then link to wordpress. Think about it, how many human hours are behind wordpress so for you to match that you will need to work full time on it for 8 years.
Wordpress will work out of the box and then periodically you can tweak it, depending on future needs.
I agree, for fun and learning, code from scratch. But consider coding something people really need and don't already have. Innovate.
There are so many excellent blog platforms out there, and some (like Wordpress) have active developer communities writing hundreds of useful and powerful plugins. And that includes some excellent support for code samples.
No need to reinvent the wheel.

Resources