jlong / serve

Serve is a small Rack-based web server and rapid prototyping framework for Web applications (specifically Rails apps). Serve is meant to be a lightweight version of the Views part of the Rails MVC. This makes Serve an ideal framework for prototyping Rails applications or creating simple websites. Serve has full support for Rails-style partials and layouts.
http://get-serve.com
Other
836 stars 90 forks source link

Problems starting Serve on OSX #1

Closed rubytastic closed 14 years ago

rubytastic commented 14 years ago

Great Project, I copyed the Radiant prototype to do some work on it, but having troubles starting serve:

serve /Library/Ruby/Gems/1.8/gems/serve-0.10.0/lib/serve/file_resolver.rb:4: undefined method mattr_accessor' for Serve:Module (NoMethodError) from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/serve-0.10.0/lib/serve.rb:2 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:ingem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in require' from /Library/Ruby/Gems/1.8/gems/serve-0.10.0/bin/serve:13 from /usr/bin/serve:19:inload' from /usr/bin/serve:19

/Library/Ruby/Gems/1.8/gems/serve-0.10.0/lib/serve/file_resolver.rb:4 = line 4 is mattr_accessor :file_resolver

Im on OSX using latest version 0.10 of serve with ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] Rails 2.3.5

How can I fix this issue?

jlong commented 14 years ago

mattr_accessor is provided by ActiveSupport, but I have no idea why you are having problems. I'm on Leopard myself. Here's my configuration:

jlong@rhyddid:~$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0] jlong@rhyddid:~$ gem list active

* LOCAL GEMS *

activerecord (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.0.2) activeresource (2.3.5, 2.3.4, 2.3.2, 2.0.2) activesupport (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.0.2) jlong@rhyddid:~$ gem list serve

* LOCAL GEMS *

serve (0.10.0, 0.9.10) jlong@rhyddid:~$

jlong commented 14 years ago

Strange. mattr_accessor is provided by active_support. I'm on Snow Leopard myself. Here's my configuration:

jlong@rhyddid:~$ ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin10.2.0] jlong@rhyddid:~$ gem list active activerecord (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.0.2) activeresource (2.3.5, 2.3.4, 2.3.2, 2.0.2) activesupport (2.3.5, 2.3.4, 2.3.2, 2.2.2, 2.0.2) jlong@rhyddid:~$ gem list serve serve (0.10.0, 0.9.10) jlong@rhyddid:~$

jlong commented 14 years ago

Closed.

sebastian-nanek commented 14 years ago

I faced the same problem with Ubuntu 9.04. The solution is simple: probably an incorrect version of active support in being loaded by the gem method. In my case it was 3.0.0.beta2. I did a strange and not even worth mentioning 'path' to serve, by changing serve runner to look like this:

sbl@sbl-laptop:~/tmp$ cat /usr/bin/serve (..) require 'rubygems' gem 'activesupport', '2.3.5' (...)