Default Green Orange
grzegorz brzezinka.eu
Be curious. Laugh a lot.
    Home Page Home
  • Contact
RSS

Posts Tagged ‘Ruby on Rails’

RoR: plugin install from GIT repository in Windows

Ruby 0 Comment »

Since Ruby 1.8.7 and Rails 2.3.5 under MS Windows system there is a common error when you run:

%rails_project_directory> ruby script/plugin install git://github.com/user/project.git

The problem is that no matter what variations and workarounds through comman line would you try:

%rails_project_directory>ruby script\plugin install http://github.com/user/project.git/

you always get the error:

Plugin not found: [git://github.com/user/project.git]

Certainly you could just download a from GIT project and copy/clone it to the vendor/plugins directory of your project. However you must admit it is a pain. Each time I installed manually  a git-hosted plugin (so almost in 95% of Rails plugins :-P ), I spent about half an hour looking for a solutions. And this morning I’ve eventually found it on www.ruby-forum.com.

Soultion

The soultion is as follows:

  1. Install msysgit if you haven’t done it yet.
  2. Go to %ruby_installation_directory\lib\ruby\gems\1.8\gems\activesupport-2.3.5\lib\active_support\core_ext\kernel and open reporting.rb in a text editor.
    (%ruby_installation_directory is c:\Rails by default)
  3. Around line 38 find:
    stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')

    and change it to:

    #stream.reopen(RUBY_PLATFORM =~ /mswin/ ? 'NUL:' : '/dev/null')
    stream.reopen('NUL:')
  4. Save the file and live in a joy and happiness of working git hosted Rails plugin installation

Maj 1st, 2010  
Tags: Ruby on Rails, tips&tricks



jQuery AJAX in Ruby on Rails

jQuery, Ruby 0 Comment »

At the beginning, I thought it is worth to check this plugin out: http://jimneath.org/2008/06/18/using-jquery-with-ruby-on-rails/

And read this tutorial: http://devguru.pl/2008/12/09/rails-ajax-i-jquery/

It turned out, that jRails is a little bit outdated — it isn’t compatible with Rails ver. >1.9. However, I have found an excellent Railscast for newbies How to use jQuery with Rails?

Finally, I would like to strongly recommend you a little more advanced, detailed turorial for using jQuery in Rails 2.3 extra-easily: Beginners guide to jQuery Ruby on Rails by Nicolas Alpi. This is what I eventually decided to use as a base for AJAX functionality. Good luck! :-)


Kwiecień 28th, 2010  
Tags: jQuery, Ruby on Rails



Work time booking system for SPM Microscope

Projects, Ruby 0 Comment »

This year Season holidays were quite productive. I’ve spent it „mastering the basis” of Ruby on Rails. I have created a simple application for booking work time for SPM Microscope.
SPM work time booking system by Grzegorz Brzezinka

You can visit it at: www.spm.brzezinka.eu

Motivation&Idea

I am doing research for my master work using SPM Microscope. There is currently quite a few people doing projects that need this device, so we have to share it. Inpired by the fact, that recently I’ve been told to organize a booking list for this microsope, I decided to make a web application instead of a paper list. And as I am turning from PHP into Ruby on Rails, I found it a perfect opportunity to see the famous rails power in action.

Project

To get familiar with Rails, I have gone through the book Foundation Rails 2 by Eldon Almeda, which I can strongly recommend for people who had something in common with webpages building. I have used three plugins:

  • Paperclip for attaching image files,
  • Restful-authentication for user authentication,
  • Event calendar to show reservations on calendar.

What is my impression on Rails after having this project done? Rails are great! And by this I mean REALLY GREAT. Comparing with PHP, one can develop application much faster and in a more efficiet way. Thing that have consumed my most of the time was… getting plugins work with my application. The true is they are not very good documented for ‘beggingers’. But luckily – ruby code is really intuitive and easy to read, so you can figure out what each function does – it is just a matter of reading through the code. The application is quite simple, no AJAX, no RSS, only simple jQuery for some basic effects. It is perfectly doing what it was expected to :-)

The conclusion from this appliscation: I would definitely use Ruby on Rails for further projects!


Kwiecień 7th, 2010  
Tags: Projects, Ruby on Rails



Next Entries
  • Newest posts

    • Export to Excel (xls) in Rails3
    • Linux: how to renew DHCP IP address?
    • Full page background image in Prawn PDF in Rails3
    • Github error – fatal: Unable to look up github.com (port 9418) (Name or service not known)
    • RubyGems warning/error: Gem::Specification# default_executable = is deprecated with no replacement. It will be removed on or after 2011-10-01.
  • Tags

    human body eye hosting domain movie image google brain gym Math .htaccess wordpress science riddle Joomla webmastering fun Rails3 jQuery Ruby on Rails tips&tricks
  • In the blog you’ll find:

    • Funny (3)
      • Riddles (2)
    • interesting facts (1)
    • linux (1)
    • Projects (1)
    • science (5)
      • computer (1)
      • human body (1)
      • Math (1)
      • physics (1)
    • Uncategorized (2)
    • webmaster tips (23)
      • Joomla (2)
      • jQuery (6)
      • Rails3 (5)
      • Ruby (11)
      • WordPress (1)
  • Translate!

      Translate to:

      Powered by Google Translate.
Copyright © 2012 grzegorz brzezinka.eu All Rights Reserved
XHTML CSS Zaloguj się
Designed by iSoftware Reviews and