Friday, April 17, 2009

My tutorial at RailsConf 2009

I'm teaching a three-hour tutorial at RailsConf 2009 on SproutCore and Rails, called "Building Next Generation Web Apps with Rails and SproutCore".  Since three hours isn't a whole lot of time, I wanted to post some things that students can do to prepare to get the most out of the training.

See you in Las Vegas!

Prerequisites

We'll use the stable release of SproutCore (0.9.23) although I plan to address what's different about the 1.0 API which is currently in alpha testing.  So to be able to work in the tutorial, you'll need recent versions of Ruby and RubyGems.  Follow these directions to install SproutCore.

Note that the SproutCore gem depends on merb-core (>= 0.9.9), erubis, rubigen, and mongrel.

Before the tutorial starts, you must be able to view localhost:4020.  If that works, you know everything installed correctly.

This may go without saying, but you also need to have Rails 2.3.x installed.  Specifically you should be able to load the Rails startup page on your development machine at http://localhost:3000/.

Recommended Reading

I strongly recommend you complete the "Hello World" tutorial on the SproutCore home page. You may also want to browse the project wiki to get more of a sense of the framework.

The most helpful wiki articles to read include:

Labels: ,

8 Comments:

At April 17, 2009 9:54 AM , Anonymous Paul Barry said...

Wish I could be there. Good luck!

 
At April 27, 2009 7:46 PM , Blogger Aaron Reichman said...

FYI, I couldn't get the SproutCore server to start up on Leopard due to an extlib compatibility issue. Downgrading that gem, per the thread below worked for me.

SproutCore server startup error

 
At April 28, 2009 8:13 AM , Blogger Mike Subelsky said...

thanks for tracking that down, hope it doesn't bother anyone else. See you soon!

 
At April 28, 2009 11:08 AM , OpenID ghfeil said...

I was successful with installing sproutcore, but am unable to get "hello world" to run. Here's the stack trace:

/Library/Ruby/Gems/1.8/gems/extlib-0.9.11/lib/extlib/time.rb:26:in `remove_method': method `to_time' not defined in Time (NameError)
from /Library/Ruby/Gems/1.8/gems/extlib-0.9.11/lib/extlib/time.rb:26
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require'
from /Users/george/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /Users/george/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:521:in `new_constants_in'
from /Users/george/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /Library/Ruby/Gems/1.8/gems/extlib-0.9.11/lib/extlib.rb:22
from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
... 9 levels...
from /Users/george/.gem/ruby/1.8/gems/activesupport-2.3.2/lib/active_support/dependencies.rb:156:in `require'
from /Library/Ruby/Gems/1.8/gems/sproutcore-0.9.23/bin/sc-server:13
from /usr/bin/sc-server:19:in `load'
from /usr/bin/sc-server:19

I have rails 2.3.2 installed as well. This occurred on OSX 10.5.6 using Ruby 1.8.6p114.

 
At April 28, 2009 11:12 AM , Blogger George said...

Oops, I just saw Aaron's comment about the extlib incompatibility just now.

 
At April 29, 2009 11:08 AM , Blogger bcarreno said...

I get the following error trying to install SproutCore. I'd say it's a compatibility issue with Ruby 1.9. The problem is I installed my Ruby 1.9 by compiling the sources and I can't uninstall it now (there's no "make uninstall"). Any ideas?

yoda:~ bcarreno$ sudo gem install sproutcore
Building native extensions. This could take a while...
ERROR: Error installing sproutcore:
ERROR: Failed to build gem native extension.

/usr/local/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile

make
gcc -I. -I/usr/local/include/ruby-1.9.1/i386-darwin9.6.2 -I/usr/local/include/ruby-1.9.1/ruby/backward -I/usr/local/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -D_XOPEN_SOURCE=1 -O2 -g -Wall -Wno-parentheses -fno-common -pipe -fno-common -o http11.o -c http11.c
http11.c: In function ‘http_field’:
http11.c:77: error: ‘struct RString’ has no member named ‘ptr’
http11.c:77: error: ‘struct RString’ has no member named ‘len’
http11.c:77: warning: left-hand operand of comma expression has no effect
http11.c:77: warning: statement with no effect
http11.c: In function ‘header_done’:
http11.c:172: error: ‘struct RString’ has no member named ‘ptr’
http11.c:174: error: ‘struct RString’ has no member named ‘ptr’
http11.c:176: error: ‘struct RString’ has no member named ‘ptr’
http11.c:177: error: ‘struct RString’ has no member named ‘len’
http11.c: In function ‘HttpParser_execute’:
http11.c:298: error: ‘struct RString’ has no member named ‘ptr’
http11.c:299: error: ‘struct RString’ has no member named ‘len’
make: *** [http11.o] Error 1

 
At April 29, 2009 1:40 PM , Blogger bcarreno said...

Yes, I downgraded to Ruby 1.8.7 and the SproutCore installation worked.

In case it's useful, although everyone is different, this is how I uninstalled Ruby 1.9:

cd /usr/local
sudo rm -Rf lib/ruby
sudo rm -Rf include/ruby-1.9.1/
sudo rm -Rf lib/libruby*
sudo rm -Rf bin/ruby
rm -Rf src/ruby-1.9.1-p0
rm -Rf src/ruby-1.9.1-p0.tar.gz

Then I re-installed Ruby, RubyGems and Rails.

 
At May 5, 2009 5:33 AM , Anonymous sudokohey said...

where is today's slide?

 

Post a Comment

Links to this post:

Create a Link

<< Home