FreeRIDE Ruby IDE

This is actually three packages: FXScintilla, FXRuby, then FreeRIDE. You must have Ruby and FOX installed first.
pkgname=fxscintilla
pkgver=1.62
pkgrel=1
pkgdesc="scintilla support for FOX Toolkit"
url="http://www.nongnu.org/fxscintilla/"
license="LGPL"
depends=('ruby' 'fox')
makedepends=()
conflicts=()
replaces=()
backup=()
install=
source=(http://savannah.nongnu.org/download/fxscintilla/$pkgname-$pkgver.tar.gz)
md5sums=('c4cb1b9d954b92e1e1fdcb75597662c6')
build() {
cd $startdir/src/$pkgname-$pkgver
./configure --prefix=/usr
make || return 1
make DESTDIR=$startdir/pkg install
pkgname=fxruby
pkgver=1.2.2
pkgrel=1
pkgdesc="FOX bindings for Ruby"
url="http://www.fxruby.org/"
license="LGPL"
depends=('ruby' 'fox')
makedepends=('ruby' 'fox' 'fxscintilla')
conflicts=()
replaces=()
backup=()
install=
source=(http://rubyforge.org/frs/download.php/1612/$pkgname-$pkgver.tar.gz)
md5sums=('1c899d20b8072396dce69c215bcc9c4e')
build() {
cd $startdir/src/FXRuby-$pkgver
ruby install.rb config -- --with-fxscintilla-include=/usr/include/fxscintilla --with-fxscintilla-lib=/usr/lib
ruby install.rb setup
ruby install.rb install --prefix=$startdir/pkg
Those are pretty straight forward. FreeRIDE was different because there's no compile or install step, there's no shell script to execute, and there's no desktop shortcut for full WM environments like Gnome or KDE.
I wrote a short little shell script to be the executable:
#!/bin/sh
cd /usr/share/freeride
ruby freeride.rb
Then I wrote a desktop shortcut:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Exec=freeride
Icon=freeride.xpm
X-GNOME-DocPath=
Terminal=false
Name=FreerIDE
GenericName=freeride
Comment=IDE for Ruby
Categories=Application;Development;
Then I opened the BULLSEYE.ico icon file in GIMP 2.2 and exported it as freeride.xpm.
Now here's the PKGBUILD:
pkgname=freeride
pkgver=0.9.2
pkgrel=1
pkgdesc="First-class cross-platform IDE for Ruby"
url="http://freeride.rubyforge.org/"
license="Ruby"
depends=('fxruby')
makedepends=('fxruby')
conflicts=()
replaces=()
backup=()
install=
source=(http://rubyforge.org/frs/download.php/2185/$pkgname-$pkgver.tar.gz)
md5sums=('04a9802f712074085349eac6d0d1483d')
build() {
#cd $startdir/src/$pkgname-$pkgver
install -d -m755 $startdir/pkg/usr/bin
install -d -m755 $startdir/pkg/usr/share/pixmaps
install -d -m755 $startdir/pkg/usr/share/applications
cp -R $startdir/src/$pkgname-$pkgver $startdir/pkg/usr/share/$pkgname
install -m755 $startdir/freeride $startdir/pkg/usr/bin
install -m644 $startdir/freeride.xpm $startdir/pkg/usr/share/pixmaps
install -m755 $startdir/freeride.desktop $startdir/pkg/usr/share/applications
Enjoy!

just add the dependencies to the AUR
btw, this script
#!/bin/sh
cd /usr/share/freeride
ruby freeride.rb
should be created in the pkgbuild like this
mkdir -p $startdir/pkg/usr/bin
echo "#!/bin/bash" > $startdir/pkg/usr/bin/freeride
echo "cd /usr/share/freeride" >> $startdir/pkg/usr/bin/freeride
..... etc ...
chgrp users $startdir/pkg/usr/bin/freeride
chmod 775 $startdir/pkg/usr/bin/freeride

Similar Messages

  • HP Device Manager won't start.

    I'm trying to start HP Device Manager but it won't work. First i tryed just buy clicking on it in my menu but nothing happened. Then i ran hp-tools in the terminal but just this came up:
    [jakob@Katten applications]$ hp-toolbox
    HP Linux Imaging and Printing System (ver. 3.11.12)
    HP Device Manager ver. 15.0
    Copyright (c) 2001-9 Hewlett-Packard Development Company, LP
    This software comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to distribute it
    under certain conditions. See COPYING file for more details.
    warning: Qt/PyQt 4 initialization failed.
    error: hp-toolbox requires GUI support. Exiting.
    As you can see here i've installed pyqt but it still won't run. I've even tryed the pyqt3 but it still didn't start. So how do i get this program running?
    [jakob@Katten applications]$ pacman -Ss pyqt
    extra/eric 5.1.7-1
        A full-featured Python 3.x and Ruby IDE in PyQt4
    extra/eric4 4.4.19-1
        A full-featured Python 2.x and Ruby IDE in PyQt4
    extra/pyqt 4.9-2 [installed]
        A set of Python 3.x bindings for the Qt toolkit
    extra/python2-pyqt 4.9-2
        A set of Python 2.x bindings for the Qt toolkit
    community/pyqt3 3.18.1-9
        A set of Python bindings for the Qt3 toolkit

    HarlemSquirrel, please read the forum rules. Necrobumping threads, especially with empty/power posts is not allowed.
    Closing...

  • Ruby on rails idea

    I had an idea for a ruby on rails application. Basically it is an online classroom. Teachers sign up and can make courses online, similar to moogle, but the data itself is also made by the teachers or other volunteers instead of it jsut being a course administration tool, with other resources needed for it to work, like textbooks, etc... e.g.: a full year math course, complete with tests and quizes and self check homework. It could feature a gradebook, forums, calendar of course events and such, schedules for work, interactive tutor pages for different aspects of subjects, online lessons, chat sessions, etc...
    Anyways, I thought this would be a cool idea to develop, and perhaps eventually even make.

    Dusty wrote:I'm sure you can justify such statements iphitus.
    Yeah I can, but i had to go out earlier
    Most of the teachers at my school are utterly clueless when it comes to computers, and to them it seems a big steep learning curve. Others just dont trust them. While they have an effective and working system in place, teachers won't want to switch to a computer based setup. Adding computers in adds even more room for disruption. When you have a class of thirty, all using computers, something *will* go wrong.
    In year 10, it is a requirement for everyone to have a laptop computer. And teachers did let us use them, to take notes, do work, etc. But the reality is, that students will be distracted. Games of counterstrike, gameboy emulators, tetris was popular, were common.
    Students could easily access webpages and such too when they desired.
    The teachers were simply incapable of policing it.
    A handful didnt realise you could minimise, and for those that did, some students discovered 'double desktop', aka multiple desktops. One keypress and battlefield is gone, your word document is on screen.
    Dont say training, it's just not practical, no matter what, teachers will be one step behind students, and once one student finds away around something, it spreads.
    And dont even consider locking computers down. With windows? pssh, good luck. It'd be easier to find a needle in a haystack than lock windows down. Linux? It's simply not ready. Linux didnt support my wireless driver for at least 6 months. Linux wireless sucks imho. Linux doesnt support many programs that the teachers and students are used to either. Dont say wine. More work, and it doesnt always provide the most consistent results.
    Which leads me to another point, what real benefits does a computer provide? the ability to use Comic Sans MS?
    Sure you can use programs like OneNote (windows oriented school ) or other things to take well organised notes, but I betcha, I could find anything in my handwritten notes faster than any computer note taker.
    Essays are best done on paper. You dont have spell check, grammar check and the ability to chop and paste in an exam.
    I suppose you could do research on the computers, but then, when the school has three full class computer rooms, why bother with laptops just for research when you could go to those rooms?
    Computers break down, computers stop working. Viruses, Infections, Spyware, Trojans, Adware (hey that spells Vista!). One student I know had at least 5 new hard drives, in 2 years. And each one interrupted his schoolwork in some way. I had one new one myself.
    The benefits of computers in the classroom do not outweigh the distractions and effects of them.
    If it aint broke, dont fix it. It's easier, and more productive to learn by paper and pen. I find i take more in if I write it by hand too.
    put simply. it doesnt work
    phew... ok, rant over.
    slightly more on topic: having a system with the things mentioned above would be terrible to maintain. It's extra work for teachers (they hate that), and it would need to be kept up to date. Curriculum changes. You couldnt share between different schools either, as many teach things differently. Online lessons? Man I have a text book! Chat sessions? I'd rather talk face to face, it's soo much quicker and effective. I know that my teachers are happy to field any questions, in or out of class time.
    secondary rant over.....
    ciao,
    iphitus

  • New wiki page on Ruby on Rails

    Hi,
    Just wanted to let you know that I created a Ruby on Rails page on the
    wiki. It's not really long but the basis is there to quickly set up a
    rails application.
    http://wiki.archlinux.org/index.php/RubyOnRails
    As always, please feel free to comment and edit the wiki.
    ekse

    Hi,
    It is a really nice idea. Maybe the page ought to serve as a hub for other articles.
    A couple of comments on sharing medias:
    * I have not been very happy with upnp. I used it for a while when I had a Synology NAS, but the fact that it seemed to rely on some kind of index made it less attractive. Samba has treated me nice; it always works (as oppose to "real" Windows shares which is a drag to setup).  I use samba for sharing videos and pictures to XMBC4Xbox.
    * For streaming live audio output, i.e. what is playing *right now* on my laptop to my stero, I have found a combo of icecast, pulseaudio and gstream to work nice. For serving static audio files I use squeezeboxserver. Had I used a Sonos sound system I would have used Samba again.
    * For PS3, which is a somewhat limited device, there is a nice java application that takes care of everything.
    * What I really miss is some way to preserve metatags when downloading video podcasts. To me it does not matter much at the moment as xbmc does not support local rss feeds. . . 
    I could add some comments on some of the above if you think it fits into your article.
    --Rasmus

  • "Permissions Differ on "usr/lib/ruby" ?!

    I'm using Leopard. After a recent startup problem with a Macbook I ran Disk Utilities, Verify Disk Permissions, and got the following message:
    "Permissions differ on "usr/lib/ruby", should be lrwxr-xr-x, they are drwxr-xr-x."
    1) What does this mean?
    2) Is it a serious security issue (i.e. malware)?
    3) What do I do about it?
    Thanks
    Message was edited by: Cowfreek

    ============================================================================
    "If you use the menu item "Go" and select the "Go to folder..." option, you can type in:
    /usr/lib
    and check to see if ruby is an alias or an actual folder. It should appear as an alias in the Finder,"
    ============================================================================
    Ok, did that so I'll give you an long list of stuff I found, if you have the patience to go through it all.
    Finder > Go > Go to folder > /usr/lib. There are 4 Ruby aliases (with arrow symbol) there: "libruby.1.dylib" , "libsvnswigruby-1.dylib" , "libsvnswigruby-1.0.dylib" and "libsvnswigruby-1.0.0.0.dylib".
    AND, yes, there is also an ACTUAL RUBY FOLDER (blue, no arrow) in usr/lib.
    This Ruby folder breaks down into the following subfolders: (Finder>Library>)Ruby Folder (blue)> site_ruby > 1.8 > osx and powerpc-darwin 8.0 (two folders). In this "osx" folder there are 9 .rb files called active_record.rb, addressbook.rb, appkit.rb, cocoa.rb, coredate.rb, foundation.rb, NMOSXDockHelper.rb, qtkit.rb and webkit.rb. In the powerpc-darwin8.0 folder is a rubycocoa.bundle icon (like a lego brick).
    The followinig actual folders (blue, no arrow)) are also present in usr/lib: dtrace, groff, java, mecab, openmpi, pam, php, pkgconfig, podcastproducer, sa, samba, sas12, sqlite3, system, and zsh.
    =================================================================
    "and the original folder is supposed to be in
    "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby"
    You might also check that location to see if the ruby folder is there."
    ==============================================================================
    Yes, it's also in this location. There are 2 main Ruby folders (blue, nop arrow) in System/ Library/Frameworks: one called 'RubyCocoa.framework', the other Ruby.framework. Ruby.framework > 1.8 > usr > (here there are three more folders 'bin' , 'lib' and 'share') lib > ruby. Here, in this ruby folder are aliases (site_ruby' and 'user_gems' as well as actual folders called 'gems' and 1.8. In 1.8 there are further subfolders named bigdecimal, cgi, date, digest and such which are NOT in the Ruby folder in usr/lib.
    ============================================================================
    I have no idea whether anything in the Mac OS actually uses ruby stuff or not. Ruby is a programming language, and Ruby on Rails is used in web development.
    Francine
    Francine
    Schwieder
    ================================================================================
    By the way, I performed the Safari 3.1 update, Garageband Update 4.1.2 , iPhoto Update 7.1.2 , and Airport Utility 5.3.1 update two days before this all happened. I rebooted after the updates were fully installed, used the macbook (starting and rebooting 2 or 3 times duringthe course of the day, after which everything seemed fine). Two days later when I tried to start the Macbook I got a very long blue screen (in excess of 7-8 minutes) and had to try starting several times before I could log on. Then I ran the disk utility and got the Ruby permissions message. I've performed all the disk repair stuff and the message remains.
    I searched the Internet and could find no other examples of this happening. So, questions remain:
    1. Is there ANY possible way this could be malware, spyware, etc.?
    2. Any ideas as to how this change could have happened on my system?
    Thanks!
    Message was edited by: Cowfreek

  • Ruby PKGD Clone

    Note: by clone I refer to sharing packages over a network from a number of ad-hoc machines, this is not actually functionally compatible with Xyne's pkgD and other tools
    Hi all, I have written a Package Daemon "clone" in ruby.
    It relies on having avahi installed to provide "auto-sensing" of other ruby Package Daemons on the network, on my machines it seems to be faster than the other one by Xyne, I have no idea about memory usage or anything else to that effect.
    gems required are sinatra and dnssd.
    How it works is relatively straight forward.
    1. start dbus and avahi.
    2. start the daemon however one sees fit.
    3. modify the mirrorlist to include
    Server = http://127.0.0.1:14686/$repo
    4. repeat on other machines
    if it does not find a package either on it self or on the network it returns a 404.
    if it finds a server with the packages, it returns a 302 with the server and package url.
    going to http://127.0.0.1:14686/ will produce a simple list of found servers apart from itself.
    current limitations include:
    must all be running on the same port, dnssd does not seem to want to actually resolve anything.
    it relies on mDNS being in nsswitch.conf, same reason.
    require 'rubygems'
    require 'sinatra'
    require 'dnssd'
    require 'net/http'
    configure do
    Hostname = `hostname`.strip
    CacheDir = "/var/cache/pacman/pkg/"
    Port = 14686
    Domain = "local"
    Info = true
    Colleagues = {}
    set :port, Port
    register_service =
    DNSSD::register(
    Hostname,
    "_pkgd._tcp.", Domain,
    Port) do
    puts "* Registering the Package Daemon" if Info
    puts "* Scanning network for Package Daemons" if Info
    service = DNSSD.browse('_pkgd._tcp.') do |reply|
    if (reply.flags == DNSSD::Flags::Add)
    unless reply.name == Hostname
    puts "adding: #{reply.name}" if Info
    Colleagues[reply.name] = 1
    end
    else
    unless reply.name == Hostname
    puts "removing: #{reply.name}" if Info
    Colleagues.delete reply.name
    end
    end
    end
    end
    end
    helpers do
    def cache_check?(file)
    if File.exist? CacheDir + file
    return true
    else
    return false
    end
    return false
    end
    def ask_colleague?(colleague,uri)
    resp = Net::HTTP.get_response(URI.parse "http://#{colleague}:#{Port}#{uri}/ask")
    case resp
    when Net::HTTPSuccess
    return true
    else
    return false
    end
    end
    end
    get '/' do
    redirect '/colleagues'
    end
    get '/colleagues' do
    html = "<html>"
    Colleagues.each_key do |colleague|
    html += "<b> #{colleague} </b><br>"
    end
    html += "</html>"
    end
    get '/:repo/:file' do
    file = params[:file]
    if cache_check?(file)
    send_file CacheDir + file
    end
    Colleagues.each_key do |colleague|
    if ask_colleague?(colleague,request.path_info)
    redirect("http://#{colleague}:#{Port}#{request.path_info}")
    end
    end
    404
    end
    get '/:repo/:file/ask' do
    file = params[:file]
    if cache_check?(file)
    200
    else
    404
    end
    end
    Last edited by jshield (2010-02-18 19:53:47)

    jshield wrote:My issues are more speed related. I have 5 archlinux machines and pkgD was taking several seconds to do its thing over the network, so I wrote this.
    Ok, but why did you make this claim then:
    jshield wrote:and generally all around more stable than the other one by Xyne
    That implies that PkgD is not stable, and I take issue with the accusation if there is no basis for it.
    I have nothing to say about speed. You might have been able to improve it with a change to your configuration, but now that you've written this it hardly matters. It will be interesting to see what others find.

  • VIM Plugin VJDE, Ruby Error: invalid byte sequence in UTF-8

    Hello
    I'm trying to install the vim VJDE Plugin for java syntax highlighting.
    wget tarball
    tar xvzf tarball
    makepkg -s
    pacman -U ...
    No Problems here.
    When i run vim foo.java it shows me this mesage:
    Error detected while processing /usr/share/vim/vim73/plugin/vjde/vjde_template.vim:
    line   18:
    ArgumentError: invalid byte sequence in UTF-8
    Code on line 18:
    ruby Vjde::VjdeTemplateManager.load_all(VIM::evaluate('g:vjde_install_path'))
    So.. I'm no ruby programmer but i dont see any non UTF-8 Character in it.
    When i comment it out, the error does not show.
    Couldn't google anything about it. Maybe it's just a bug in the current version of Ruby.
    Would be nice if anyone can help me.
    Regards, Archdove
    Last edited by Archdove (2011-09-23 18:21:35)

    Hi,
    It's a encoding problem. I wrote about this problem to author. He uses en utf8 locale, but some files has unrecognized encoding. Enconv can't convert to utf8.
    $ find -type f -a ! -name readtags -a ! -name '*.class' -a ! -name '*.jar' | xargs enconv
    enconv: Cannot convert `./src/previewwindow.cpp' from unknown encoding
    enconv: Cannot convert `./src/wspawn.cpp' from unknown encoding
    enconv: Cannot convert `./src/tipswnd.lex' from unknown encoding
    enconv: Cannot convert `./src/vjde/completion/ClassInfo.java' from unknown encoding
    enconv: Cannot convert `./src/vjde/completion/Completion.java' from unknown encoding
    enconv: Cannot convert `./src/tipswnd.c' from unknown encoding
    enconv: Cannot convert `./plugin/vjde/vjde_java_completion.vim' from unknown encoding
    enconv: Cannot convert `./plugin/vjde/project.vim' from unknown encoding
    enconv: Cannot convert `./plugin/vjde/vjde_tag_loader.vim' from unknown encoding
    enconv: Cannot convert `./plugin/vjde/tlds/java.vjde' from unknown encoding
    I'm looking how to convert to utf8. Try open file e.g. src/previewwindow.cpp in vim with fencs=gbk,utf8,default. Vim detect fenc cp936. In line 644 are chinese characters(?): /* 另一个回调函数 */
    Any idea?

  • Ruby on Rails environment

    I have tried the Apple tutorial and Adam Blackbourne's book and website and still cannot get a functional environment started so that I can develop using Ruby on Rails. I get Ruby installed, Textmate installed, and then seem to get bogged down with Textmate and sql. I seem not to have mysql properly installed but I can't figure out what's wrong. Both these sources above refer to some great package call Locomotive that is "the golden path..." but it has been withdrawn by its author. Any ideas on how to proceed? What sources are available?

    Hi,
    I'm not sure what your stated problem is here? It seems you are describing problems with Ruby on Rails on Leopard and coincidentally with mysql based on the Apple tutorial; are these one problem or two? Please note that the tutorial is describing running mysql on server which is part of the 10.5 server package.
    I have been running Rails 2.0.2 on Leopard client which I loaded following the tutorial (once I loaded Xcode 3 on the client as well). Since Rails 2.0 comes with sqlite3 as its default database, you can be up and running on 10.5 client in short order and save your mysql for deployment. In my case I also have 10.5 Server and have been testing with Rails and reverse proxies while operating in development mode (with sqlite3). When I start porting over to Server, mysql is a service on server and has a unique configuration. So the tutorial may not be applicable if you are using it with a mysql standard type install. You can read about the server install environment of mysql at
    http://docs.info.apple.com/article.html?path=ServerAdmin/10.5/en/c6ws25.html
    Actually, Ruby on Rails 2.0.2, TextMate and Ruby-Debug form a great environment for development. Not quite an IDE on 10.5 but almost there.
    Hope this helps,
    Harry

  • Can't "require builder" for Ruby.

    I have not the faintest clue how Ruby and gems work. I'm just trying to compile some software.
    The following fails:
    require 'rake'
    require 'rubygems'
    require 'builder'
    Complaining that it can't find a file for builder. This is on a fresh install of ruby (1.9.1). What's wrong?
    Thanks.

    MTsoul wrote:
    Well I don't know Ruby at all, so this is just a bunch of things that seem "weird" to me:
    - Rake. Why a build system for a scripting language? What's wrong with make/configure/CMake, etc? I guess my gripe here is the fact that I'm trying to compile a Chromium extension, written in javascript, but somehow with a build system in Ruby.
    - The fact that it does something at the level with stuff like Rakefiles. It's a general-purpose script, not a specialized utility like make. Make establishes its purpose when people see "makefile" and go "oh I should type make to build this". Is Ruby trying to do this? If it is, why is it a generic scripting language at all? If not, why do this at all?
    - Gems are too integrated into Ruby. It'd be a lot nicer if gems (and extensions/plugins) were simply based on how files were placed in the lib directory, and let my package manager worry about what is and how it is distributed. (Like how Python is done on Arch - setuptools is not essential to the operation of things.) And for "gem install builder", why did it not require root access? If it didn't modify a system-file, did it cache something in my local directory or a tmp/var directory? Is that really the right way of doing things? E.g. security concerns.
    - It's interpreted, yet the functionality it provides seems low-level enough (compared to PHP anyway) that it should at least have compiled versions. But this isn't really weird I guess, it's more of what Ruby is meant for and I'm not into it enough to appreciate it.
    - Trying to get it working on a server?! Holy crap @ the amount of setup and configuration.
    But yeah. One thing I'm thankful for is how much popularity Git has gained with Ruby's usage of it.
    1) Ruby is not just a scripting language. It can be used for anything just like for example Python and Perl can, but that does not always make it the best tool for the job.
    2) Rakefiles are just a means of automating tedious tasks. For example, you could have a rake task for running all your unit tests. Or for re-generating the documentation of your project. You get the idea, anything is possible.
    3) When you install gems as a normal user, they will be installed under ~/.gems. I'm not sure what the concern is here.
    4) I'm not sure if I understand what you mean here but anyway: Ruby cannot be compiled. What you are talking about are probably C extensions. It's really easy to integrate a piece of C into Ruby as a library, partly due to the fact Ruby itself is written in C.
    5) Are you talking about Rails? Personally I think Rails deployment has become a total breeze with the introduction of Passenger etc.

  • HTML generator script (in Ruby) - what do yout think about it?

    Hi folks,
    since I have a lot of time recently, I decided to create a little (non-dynamic) website with HTML and CSS.
    So, when I began writing I noticed that there is a lot of "typing overhead" what really went on my nerves.
    Be it as this may... I was thinking about how I could shorten the whole process of writing HTML-code.
    I began writing a little ruby-script, wich reads a HTML file line by line, searches for a certain pattern, interprets this pattern and generates HTML-code out of it.
    I hope you get what I mean. Here is the code (it's still experimental... )
    # Command class - contains the "template"-code
    class Commands
    # generate a list
    def Commands.list(args)
    s = "<ul>\n"
    args.each { |arg| s += "<li>#{arg}</li>\n" }
    s += "</ul>\n"
    end
    # generate a headline
    def Commands.h2 (args)
    "<h2>#{args.join(" ")}</h2>"
    end
    # generate an image
    def Commands.img(args)
    "<img src='#{args[0]}' width='#{args[1]}' height='#{args[2]}'/>"
    end
    end
    # Searches for pattern and executes them
    def execute_rubyfoo(content)
    content = content.map { |line| line.strip }
    new_content = content
    success = 0
    errors = 0
    puts "Generating..."
    new_content.each_with_index { |line, i|
    # line matches pattern
    if line =~ /^\$\$\s*rfoo.*/
    command = new_content[i].sub(/\$\$rfoo\s*/, "")
    command = command.sub(/\s*\$\$/, "")
    command = command.split(" ")
    begin
    method = Commands.method(command[0])
    new_content[i] = method.call command[1..-1]
    success += 1
    rescue NameError => e
    puts "--> Line #{i + 1}: Command not found: #{command[0]}"
    errors += 1
    end
    end
    puts "\n---"
    puts "Finished: #{success} successfully, #{errors} errors."
    new_content
    end
    file = File.new("foo.html", "r+")
    new_content = execute_rubyfoo(file.readlines)
    file.close
    new_file = File.new("foo.html.bla", "w+")
    new_file.puts new_content
    new_file.close
    An example HTML-file could look like that:
    <html>
    <body>
    <h1>Hallo</h1>
    $$rfoo list 1 2 3 4 5$$
    $$rfoo h2$$
    $$rfoo img bla.png 100 100$$
    </body>
    </html>
    And a generated HTML-file like that:
    <html>
    <body>
    <h1>Hallo</h1>
    <ul>
    <li>1</li>
    <li>2</li>
    <li>3</li>
    <li>4</li>
    <li>5</li>
    </ul>
    <h2>foo</h2>
    <img src='bla.png' width='100' height='100'/>
    </body>
    </html>
    So, now what I want to know is:
    What do you think about this idea in general and the way I implemented it? Is there already something like that?
    Thanks,
    g0ju

    ERB is even part of the standard ruby libraries. See the Notes for other alternatives.
    I have to admit that I'm guilty of reinventing that wheel, too
    Last edited by hbekel (2009-09-22 09:04:57)

  • Python and Ruby option is missing from XCode

    I just installed xcode 3.2 and noticed I don't have the python, ruby or Java option when I try to create a new project.
    This happened when I uninstalled 3.1 and installed 3.2
    Any idea what happened? How do I get them back? I'm running Mac OS X 10.6.
    TIA,
    Fred

    Apple stopped including Cocoa project templates for Python and Ruby in Xcode 3.2. An engineer said on Apple's Xcode mailing list that the templates included with Xcode were constantly out of date. They encourage developers to download the templates directly from the PyObjC and Ruby Cocoa websites.
    Apple yanked the Java project templates from the New Project Assistant. To access them in Xcode 3.2, you must open the Organizer by choosing Window > Organizer. Click the + button at the bottom of the Organizer and choose New From Template > Java Templates.

  • Im having trouble installing Ruby on my Mavericks

    lakshmis-MacBook-Pro:~ lakshmishanthappa$ rvm install 2.0.0
    Searching for binary rubies, this might take some time.
    Found remote file https://rubies.travis-ci.org/osx/10.9/x86_64/ruby-2.0.0-p481.tar.bz2
    Checking requirements for osx.
    /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
    /usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
    ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
    Requirements installation failed with status: 1.
    lakshmis-MacBook-Pro:~ lakshmishanthappa$ rvm install 1.9.3
    Searching for binary rubies, this might take some time.
    No binary rubies available for: osx/10.9/x86_64/ruby-1.9.3-p547.
    Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
    Checking requirements for osx.
    /usr/local/bin/brew: /usr/local/Library/brew.rb: /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby: bad interpreter: No such file or directory
    /usr/local/bin/brew: line 23: /usr/local/Library/brew.rb: Undefined error: 0
    ERROR: '/bin' is not writable - it is required for Homebrew, try 'brew doctor' to fix it!
    Requirements installation failed with status:
    This is what I get always .

    Install homebrew. Then brew update followed by brew upgrade. Leave it alone. RVM will look for the presence of this package manager, and will use it to install any missing dependencies when installing RVM itself or new versions of Ruby that need to be compiled.
    Without system privileges, just perform the rvm curl install into your home directory. Everything gets stuffed into ~/.rvm hierarchy.
    In the Terminal, to see latest Rubies.
    rvm list | more
    Although OS X 10.9.3 updated MRI Ruby to 2.0.0p451, a 2.0.0p481 and 2.1.2 release are now available.
    rvm install 2.0.0p481
    rvm use 2.0.0p481 --default
    rvm list
    gem update
    Verify that your .bashrc file has this new Ruby path included.
    export PATH=$HOME/.rvm/gems/ruby-2.0.0/bin:.:/usr/local/bin:$PATH
    and at the end of the .bashrc file:
    export PATH=$PATH:$HOME/.rvm/bin
    [ -s $HOME/.rvm/scripts/rvm ] && source $HOME/.rvm/scripts/rvm
    It is a good idea to keep RVM current.
    rvm get stable
    Though unrelated to RVM, I would also do a softlink of the old Ruby-Cocoa v1.8.7 version.
    ln -s /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby ~/bin/ruby18
    Apple did not bake any Objective-C/Cocoa support into Ruby 2.0. It is in the older version above.

  • [SOLVED] bundle from ruby package can not install gems

    Hello, I was stuck with 'bundle' for hours, I do not know anything about Ruby, and even looking at the code won't get my anywhere. kindda don't like it... (guilty). Anyway, I'm gonna post it here to save someone else's time.
    What I was trying to do:
      I was trying to run this command, as developing an omega sub-theme for Drupal requires this. This command will read GemFile and install all GEM dependencies.
    bundle install
    What happened? What's the problem?
      this happened:
    Fetching gem metadata from https://rubygems.org/............
    Fetching additional metadata from https://rubygems.org/..
    Resolving dependencies...
    Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
    /home/MY_USER/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
    *** extconf.rb failed ***
    Could not create Makefile due to some reason, probably lack of necessary
    libraries and/or headers. Check the mkmf.log file for more details. You may
    need configuration options.
    Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/home/MY_USER/.rvm/rubies/ruby-2.1.2/bin/ruby
    --with-ffi_c-dir
    --without-ffi_c-dir
    --with-ffi_c-include
    --without-ffi_c-include=${ffi_c-dir}/include
    --with-ffi_c-lib
    --without-ffi_c-lib=${ffi_c-dir}/lib
    --with-libffi-config
    --without-libffi-config
    --with-pkg-config
    --without-pkg-config
    /home/MY_USER/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
    You have to install development tools first.
    from /home/MY_USER/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:541:in `try_link0'
    from /home/MY_USER/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:556:in `try_link'
    from /home/MY_USER/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:642:in `block in try_ldflags'
    from /home/MY_USER/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:635:in `with_ldflags'
    from /home/MY_USER/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:641:in `try_ldflags'
    from /home/MY_USER/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/mkmf.rb:1762:in `pkg_config'
    from extconf.rb:15:in `<main>'
    extconf failed, exit code 1
    Gem files will remain installed in /home/MY_USER/.rvm/gems/ruby-2.1.2/gems/ffi-1.9.3 for inspection.
    Results logged to /home/MY_USER/.rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/ffi-1.9.3/gem_make.out
    An error occurred while installing ffi (1.9.3), and Bundler cannot continue.
    Make sure that `gem install ffi -v '1.9.3'` succeeds before bundling.
    What was tried?
      Everything: cloning eventmachine directly from github which produced same result, removing gems depending on eventmachine however other packages produced the same result, ...
      The error message says: You have to install development tools first. however it was installed:
    sudo pacman --needed -S base-devel
    What was the problem? What's the solution then?
      Well, I had previously enabled multilib in pacman.com which resulted in gcc-multilib and gcc-libs-multilib being installed however these multilib packages does NOT work, gcc and gcc-libs needs to be installed instead. I do not know what is the proper solution for having these multilib packages and compiling ruby gems? (maybe adding multilib back to pacman.conf!) but it finally worked for me.
    I would create a wiki article but I don't know if it deserve's one + I'm not very good english writer + not sure if the solution is 100% right. probably this should be added to ruby page: in order to compile ruby gems you have to install gcc and gcc-libs instead of gcc-multilib and gcc-libs-multilib since multilib packages wont work because of...?
    Last edited by loolooyyyy (2014-06-19 17:33:08)

    Don't have the 7100 board , but some of theese issues are common .
    Enter BIOS in the following submenus :
    Advanced BIOS Features:
    -HD-Boot order - Make sure your SATA drive where you install OS is first in the list .
    (always check this one when altering HD's and connections of drives/usb-drives/card readers etc)
    Set normal boot order
    1'st boot device : CDROM
    2'nd boot device :Harddisk
    3'rd boot device : Harddisk (just to have something there)
    or if having floppy
    1'st boot device : Floppy
    2'nd boot device : CDROM
    3'rd boot device : Harddisk
    Boot other device : disabled
    Disconnect all USB cables coming from case or multicard dreader device etc. terminated on the motherboards JUSB1/JUSB2 .. headers .
    Enter Advanced Chipset features
    Integrated pheripherals
    Ide function setup ->
    Onchip IDE channel 0 : Disabled
    Onchip IDE channel 1 : Disabled
    SATA 1/2 : Enabled
    SATA 3/4 : Enabled
    Onboard device->
    OnBoard Sil3132 RAID : disabled
    OnBoard Sil3132 Mode :SATA
    Also recommend setting
    USB KB/Storage Support : Disabled
    (and connect the keyboard to PS2 via the delivered USB/PS2 adapter )
    Boot once , and enter bios again to verify the HDbootorder
    BTW: Having only 2.5GB for is not gonna cut it as OS partition is not enough as pagefile written under install is 1.5 times installed memory
    and the install will halt .
    Windows updates and other stuff as mail storage , my documents , user prifiles and registry hives need space and grow some over time .
    Primary OS partition workes best having altleast a minimum 20% free space all the time for housekeeping tasks lige changing layout ini , prefetch data
    defragmenting etc.
    Don't use anything less than 15GB to have peace of mind . ( I usually make it 30GB or more to avoid having lack of space later on , as that is a bitch )
     

  • Ruby and Mysql and Nmap

    I am trying to create a table name in a mysql database using ruby scripts. The name of the table should be the current date. this is how i tried to do it, but didnt work:
    in the ruby code:
    TOS = Time.now.localtime.strftime("%Y-%m-%d_#{Time.now.hour}:#{Time.now.min}")
    dbh = Mysql.real_connect("localhost", "testuser", "testpass", "test")
    dbh.query("CREATE TABLE #{TOS}
    IP VARCHAR(10),
    PORT VARCHAR(5),
    SERVICE VARCHAR(40)
    This doesnt work for some reason.. I started ruby yesterday so easy comments about my ignorance

    The article at http://developer.apple.com/tools/developonrailsleopard.html suggests updating Rails and installed gems.
    I ran the following:
    $ sudo gem update --system
    $ sudo gem install rails
    $ sudo gem update rake
    and all was well. Then I ran
    $sudo gem install mysql
    and got the following output.
    norbert:vocab bwelling$ sudo gem install mysql
    Building native extensions. This could take a while...
    ERROR: Error installing mysql:
    ERROR: Failed to build gem native extension.
    /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install mysql
    can't find header files for ruby.
    Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/mysql-2.7 for inspection.
    Results logged to /Library/Ruby/Gems/1.8/gems/mysql-2.7/gem_make.out
    norbert:vocab bwelling$
    Ideas??
    So... Something is jacked, that's for sure.

  • Ruby: PDF::Writer can't read JPG or PNG files?

    require 'pdf/writer'
    pdf = PDF::Writer.new
    pdf.image('/home/max/pics/kiwi.png')
    Results in:
    RuntimeError: Unsupported Image Type
    from /home/max/.gem/ruby/1.9.1/gems/pdf-writer-1.1.8/lib/pdf/writer/graphics.rb:668:in `image'
    Why?
    edit - can't get rid of that mysterious newline in the code snippet ... weird? oh well, you get the idea
    Last edited by synthead (2012-08-21 22:48:47)

    Hello,
    I don't know about this error, but PDF::Writer is unsupported and it is recommended to use  Prawn[1].
    Couldn't the problem be that you are using Ruby 1.9.1 and PDF::Writer written for 1.8(just a guess).
    Sebastian
    [1] http://prawn.majesticseacreature.com/

Maybe you are looking for

  • How do you [playback voice memos on iphone 5s

    I cannot playback voice memos.When I hit done it just continues recording

  • Why I will no longer be a customer of Creative.

    / I am the president of a web development firm who uses Skype and a Creative webcam to communicate with our clients around the world. This morning, we had to re-load our computers' OS because of some issues we were having, and when I went to look for

  • MBP (9,1) Optical Drive SATA link speed?

    I have found about 400 different answers for this question. Every messageboard i post to seems to have a different opinion, so to end all my confusion: Does the Optical Drive SATA port in the Macbook Pro 9,1 non-retina model have a 6 Gbps link, or do

  • After no problem for 2 yrs, signal dropping out intermittently.

    The signal is dropping out unexpectly, often this is when there is more than one device is using the wi-fi. No updates are pending on the AE or our devices. We have switched out our modem midway over the time we've been having the problem. Our ADSL p

  • When installing Oracle9i I run into a problem on the 3rd CD

    I am installing Oracle9i and on the third CD I am running into a problem. When the Configuration Tools are downloading, I am not able to download the "Oracle Database Configuration Assistant." It says that the SID I have created (during installation