I was recently working on a project where I had a series of pictures I wanted to display in a nice scroll across the screen, complete with the ability to have captions and link pictures to other pages. I stumbled across BenjaminKeen’s Image Scroller and decided to give it a whirl. It’s a really simple solution and here’s how I went about implementing it in rails. (Oh, it’s free too!) We’re going to use an XML feed to pull the data in for our images.
Here’s what our finished product will look like:
Getting Started
1. Download Source (download / old version link)Once downloaded, created a folder called image_scroller inside your public folder. Then, place: scroller_x.swf and swf_object.js inside the image_scroller folder. The rest of …
Continue Reading »
I’ve recently fallen in love with amcharts, a great little flash package that allows you to create kick-pants charts on your site. I’m still experimenting with all the possibilities it can do, but then I came across this great post by Matt Aimonetti [Rails on the Run] and it all becomes much easier.
I highly recommend checking out amcharts. It’s gonna be an amazing tool for not only ruby charts, but any charting needs you have that can use XML.
Hopefully I’ll write a bit more about ruby in the upcoming months — sorry for the lack of tutorials. In the meantime, I highly recommend Ryan’s railscast’s. It’s a great video-podcast with over 70 short, quick, and highly useful tutorials.…
Continue Reading »
I realize I said a few weeks ago that I’d have a tutorial up for the next step in the ruby member management system. The good and the bad:
The bad: I didn’t get the tutorial done.
The good: I’ve got a system in development that goes live this fall which uses ruser as a platform. I’m super excited because I have some interest and potential investors happening with it! That’ll be news later this summer.…
Continue Reading »
Those following the development of ruser will be happy to note a few things:
- I’ve added dynamic pages to the ability of the admin. Needs some fine-tuning, but very cool and powerful. Great for an ‘about’ page or a ‘faq’ page.
- I’m seriously going to start working on the next installment of the tutorial. I had a bit of a distraction of applying to an MBA program and then a trip to Orlando for a conference. Well, I’m back and ready to get going!
On the logged-in page of ruser, you’ll be able to see what’s left to be developed before the first official release. An ever changing list, hopefully it’ll be done in the next month. Then ruser will be implemented in the its …
Continue Reading »
Today we continue our adventure in Ruby creating a Last time we set-up the general background support for the system. Today, we’re going to make some magic appear on the screen, and get some data on our pages.
Making it Run
To get started, let’s just make sure we have things all well in the Ruby world. You should still have a command prompt open and your favorite editor. In the command prompt, let’s do the following:
ruby script/server
You just started the ruby server on your computer. Where did it come from? From when you installed ruby of course! Now, go to your internet browser and enter:
http://localhost:3000/
This is the address of your local machine and the ruby server. You should see something …
Continue Reading »
As I mentioned before, I’m going to work on publishing a ROR User System Tutorial (RoRUST for short) that will let you create a fully managed user system. People will be able to login, edit profiles, create admins, and much more. I’m very excited to share some wisdom back to the community. So, here we go!
Today’s goal: set up the basics so we can start playing with the actual system! (feel free to fast forward through what you know, but we’ll take it slow for those following along.)
Note: This is all done on a windows machine. Some Mac things may vary…but I’m sure you’ll figure out what needs to happen…
Setting up the Directory
Throughout this process you’ll need a command prompt …
Continue Reading »
Just a quick note on the upcoming tutorial series. Due to my current work load and spring training of employees, I’ll be launching the tutorial series probably the last week of January.
Also – I updated the ROR tutorials to be tagged with ruby tutorial categories instead of “programming stuff.”
(Probably won’t have many posts till then either…sorry!)…
Continue Reading »
I’ve been working on a really generic ROR user interface. (It’s all part of an alumni system I’m making for my high school graduating class.) I’m going to be going into a few tutorials over the next week or so on how to set it up and understand what’s happening. I know that there are some books out there already (Programming Ruby: The Pragmatic Programmers’ Guide being a great starting point and also Ruby on Rails: Up and Running) Here are some of the features that I’ll share (in no particular order):
- registration with validation
- user list with: viewing of profiles, denotation of admins
- updating personal profile and deleting profile
- updating password with old password validation
- login/out functions
- and perhaps more…
Eventually I’ll …
Continue Reading »
Here’s some quick and dirty information on how to include an XML feed into your ruby site.
Install & Implement Gem
Begin by installing the feed_tools gem.
gem install feedtools
In the environment.rb file, include at the bottom:
require 'feed_tools'
Using the Gem
In your controller, pick a method (mine sits inside view) and implement a new feed: (This pulls my del.icio.us feed)
@feed = FeedTools::Feed.open("http://del.icio.us/rss/matthewvb")
Then, I like to add some pagination, cause I don’t want all the info, just the latest:
@pages, @items = paginate_collection @feed.items, :page =@params[:page]
Finally, render it partially (this will display each instance of your XML data — basically it does the looping through the array for you)
render :partial ="feed"
Pagnation
I used …
Continue Reading »
wow – this could be the most frustrating thing to figure out. it may have been cause i was just having a long day, but let me share the two best resources to get a functioning ruby on rails version of a flickr pull.
In efforts to share some wisdom on what really needs to happen, check out the following:
The ROR Screencast really will get something functioning, but it leaves out the following information about obtaining a valid API key.
Register for a Flickr API
Register for a Flickr API. Be sure to put non-commerical use. The key generated is the important thing.
Install Flickr Gem
In your rails app install the flickr gem:
gem install flickr
Then go in and edit the …
Continue Reading »