Mostrando postagens com marcador IDE. Mostrar todas as postagens
Mostrando postagens com marcador IDE. Mostrar todas as postagens

sexta-feira, 27 de maio de 2011

I want to use Lua....but what about the IDE?

I think that the title said it all, you look to Lua as a good language to create whatever you're planning to, but then you face a neat problem: The IDE.
This post is dedicated to Lua devs and game devs, specially those that decided to use Corona SDK as an application platform (more game SDK than app SDK).

The steps to follow are:

  1. Download and install IntelliJ Community Edition or pay for other versions (is not really necessary if you don't really need) from here http://www.jetbrains.com/idea/download/index.html
  2. Download Lua plugin for IntelliJ here http://plugins.intellij.net/plugin/?idea_ce&id=5055
  3. Now unzip Lua plugin and copy IDLua folder to intelliJ's plugin folder in a path like this C:\Program Files (x86)\IntelliJ IDEA Community Edition 10.5\plugins (is very likely that your folder path is another one)
  4. Open IntelliJ and access Settings in the file menu or type Ctrl+Alt+S. In IDE Settings section you'll see the Plugins area, click it and check if Lua is listed on the right panel. If isn't appearing there try to install trough available list or follow this tutorial https://bitbucket.org/sylvanaar2/lua-for-idea/wiki/Home
  5. Hey its done!!! When you start project creation you'll see Lua option in the list...
Now for Corona SDK
  1. Download the Corona SDK for IntelliJ here https://bitbucket.org/sylvanaar2/idlua-sdk-corona/wiki/Home
  2. Unzip the package into a fixed place, this means that this folder (Corona SDK for IntelliJ) must remain there as long as you're using it with the IDE
  3. After creating the project you will work into select project's root and type F4 to access project structure.
  4. Here click in SDKs in Platform Settings section and in Lua sdk add a new Classpath, in this case the path to your Corona SDK fixed folder.
  5. Ready to rumble!!! Now you have intellisense for Corona code and the documentation (type ctrl+q to access it)
Note: You must add SDK's and API's in every project you need them.

If you have any problems adding sdk's and api's follow the tutorials bellow or email me: vitor dot navarro87 at gmail dot com 

quinta-feira, 6 de agosto de 2009

MySql 5.1 doesn't work with Ruby!!

I'm starting to develop applications with Ruby On Rails, my enviroment is Windows XP and Aptana Studio 1.2 or Netbeans 6.7, I'll talk about the IDE decision in other post.

Ok so I was reading my ebook, Simply Rails 2 by Patrick Lenz, I got it via email given by the editor's website, and I started to see the chapter about database interaction. When the command db:migrate was executed in the ruby console it returned the following error: "undefined method `each' for #"

First thing to do was to google the error rsrsrsrsr and after a little while in the web, something close to 30 min, I found one solution and one reason to the error.

The reason for that error to happen is that ruby 1.8 and 1.9 are still compiled to work with MySql version 5.0, they say that it might work with latter versions but that isn't my case =[.

So you have some ways to work it around:
First: Roll back your MySql version to 5.0 or earlier. Not a good one, but works.
Second: Put Instant Rails libmySQL.dll file into your ruby/bin directory. Save the old one for eventual needs. That's the one I used and works pretty well with MySql 5.1 and 6.0, at least until now.
Third: Choose another database, okay this isn't the best one but if anything else doesn't work at least there are another databases that are compatible with ruby.

If you have some work around for this problem too please feel free to comment here, or send it to my email vitor.navarro87@gmail.com and I'll make a post with your email in my blog =].

Hope this save others lives to.....