Ruby. Shoes. DataMapper.
After an encoding error I get 'failed to build native extensions'.
That happens when I do the Shoes.setup and it tries to fetch and install the gem.
Since Shoes can't be run as a gem is there a different approach?
you're wrong, shoes CAN be run as a gem, you have different flavors (colors) of shoes.
Most people work with Red Shoes but you also have a Green Shoes implementation, i use it always with native extensions. Not all methods from red are available and possibly you have to change your code a little but it should work. Success !
Related
What is the least headache technique to package a gtk2/gtk3 app built with ruby for distribution as an executable, for windows, linux, macos?
I could not find any guides or helpers to resolve this for ruby gtk. Nor the ruby-gnome gem comes with a packager.
It is my understanding that gtk is cross-platform, so it should not be trivial to do this. Problem is I am unable to find anythin reliable to follow as an example and learn the steps.
I've come across the same problem as you and I've put the question directly to the GTK3 developers.
here is their answer.
Which means that if you choose to use GTK3 today with Ruby, you have to:
Deliver MSYS2 and Ruby with your GEM.
Deliver your gem and tell users to install themselves msys2 (with updates) and ruby and your gem with dependencies.
It seems that the core developers of ruby-gnome2 are unconcerned about app distribution outside the Ruby community.
For example, Mr. Sutou, one of the maintainers of ruby-gnome2, distributes his Ruby/Gtk presentation tool "Rabbit" only as a Ruby Gem.
I'm trying to make a simple multiple choice question app. Is this possible on ruby?
I've tried using shoes but I don't know how to create multiple classes and a GUI that uses them.
I'm also trying to connect all of this to a database.
I'm having trouble in understanding how to connect all of this together.
According to the comments the main problem seems to be with using the mysql gem part.
Gem usage depends on the version of shoes you are using. For green_shoes you should be good with the standard gems, but it is unmaintained. Shoes 3.1 has problems with gems that have C extensions (such as mysql). Shoes 3.2 should work. With Shoes4 you can't install the normal Ruby gems with C extensions as it uses JRuby and C extension support in JRuby is disabled. You have to use different gems to connect to the database, functionality is the same. A starting point might be activerecord-jdbc.
I have been making an app using Ruby Shoes. I am happy with how it turned out and would like to share it with some friends. However, the GUI packager doesn't work in OSX and the Windows packager only seems to make a .shy file. I've been reading around looking for solutions and I don't understand any of them. Can someone clearly explain step-by-step how to package a Ruby Shoes app to say a DMG or an EXE file?
Personally, I prefer to use green_shoes. Green_shoes is a pure ruby gem that you require in your ruby code instead of a program that packages your ruby code. This way, you can use a program such as ocra to make your ruby file into exe. While it is sort of a hack, I feel that it is better than requiring your users to install shoes to run your program.
Check this out.
Compiling/Package a Shoes.app to a standalone Mac.app?
[How?] "By compiling your app and Shoes together. This is what I do with Hackety Hack. Totally works."
I am wanting to do a game in Ruby, but I came across a problem. I am intermediate level in Ruby. I only know of running Ruby through the command line but to make the game I am thinking of similar to Dwarf Fortress would require something more.
I need to be able to use arrow keys and enter to select things. I also need 2 frames displaying, one for the map and one for in-game information.
How do I go about doing this? Would I need to use a GUI or something to that effect. If it can't be a desktop app, that's fine. I have a vague idea of how I could do it in the browser.
Check out the gosu gem which gives you a 2d game engine from www.libgosu.org
gem install gosu
# complete with examples, precompiled for Windows & OS X
gem install texplay
# pixel-based drawing on Gosu images, by banister
gem install chingu
# a library that adds more game logic, by ippa
gem install ruby-opengl
# the standard Ruby OpenGL gem works fine with Gosu to add 3D effects
# (See the included example, or this fine bundle of tutorials by tjbladez. Also note this thread if you have problems installing on Windows)
gem install chipmunk
# a popular physics library with an integration example in the wiki
gem install rmagick
# can be used as a more powerful but harder-to-distribute alternative to TexPlay, example included in Gosu
How about ruby-gl
http://ruby-opengl.rubyforge.org/
i'm a web designer (front-end developer) who would like to use sass+compass and slim-lang (similar to haml, but more lightweight). if you're unfamiliar, these are all rubygems, which parse code and compile to html and css. That's where my understanding ends.
i've been through a few ruby tutorials, but they're ALL geared towards mac users. sadly, i'm a windows user, and i get but a confusing footnote. i tried installing ruby, but none of the commands would work, so i started looking at other solutions (due to windows' sickening lack of a useful command line).
currently i'm looking into using cloud9 for editing and github for compiling (is that even possible?)... but i don't understand git at all. is this overkill? is there an easy way to do this, or at least some concise explanation of all this? i know i'm not stupid; i just feel like there's some key thing i'm missing here.
(note to self: buy a mac)
tl;dr:
Things I have:
windows
Things I need:
a simple ide to edit code / manage projects
a simple way to compile slim,compass,sass without a headache
Sorry to hear you're having problems. Some things to try:
Install RubyInstaller
In the Windows Start menu locate the Ruby program group and run "Start Command Prompt with Ruby"
At the prompt type gem install compass
You should see something like this:
ruby 1.9.3p0 (2011-10-30) [i386-mingw32]
C:\>gem install compass
Fetching: sass-3.1.15.gem (100%)
Fetching: chunky_png-1.2.5.gem (100%)
Fetching: fssm-0.2.8.1.gem (100%)
Fetching: compass-0.11.7.gem (100%)
Successfully installed sass-3.1.15
Successfully installed chunky_png-1.2.5
Successfully installed fssm-0.2.8.1
Successfully installed compass-0.11.7
4 gems installed
Does this work? If so then you're good to go. You'll also need to install Slim: gem install slim. Try following the Compass install documentation from here. The commands for Windows are identical to those for Mac/Linux. If you need some help learning about the Windows command line, there are plenty of tutorials around.
Take a look at Compass.app and Scout if you really don't get on with the command line. I really do recommend getting to grips with the command line, though. It's a very handy skill to possess.
I'd recommend using a simple text editor rather than an IDE. I prefer Sublime Text 2, but Notepad++ or Scite might suit you better. RubyMine is a good IDE, but it's not exactly simple.
Forget Git for now - you don't need it for what you're trying to do (compile Sass and Slim files).
One final parting thought: what you're after doing it roughly equal in difficulty on a Mac, so purchasing one wouldn't, at this stage, make life much easier for you. In the long-run, though, if you get into, say, Rails development seriously, then a Mac would make life easier. If you're simply compiling Sass and Slim, though, no need to switch. The authors have done a great job cross-platform job.