You are not logged in.
I'm not sure if this is necessarily the right forum for this.
When I build a new rails app (entitled 'tests') using scaffolding, the index page looks fine but when I click on 'new test' I get this:
NoMethodError in Tests#new
Showing app/views/tests/new.html.erb where line #3 raised:
undefined method `^' for "8":String
Extracted source (around line #3):
1: <h1>New test</h1>
2:
3: <% form_for(@test) do |f| %>
4: <%= f.error_messages %>
5:
6: <p>
RAILS_ROOT: /home/matt/tests
Application Trace | Framework Trace | Full Trace
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:46:in `block in secure_compare'
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:45:in `each'
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:45:in `secure_compare'
/usr/lib/ruby/gems/1.9.1/gems/activesupport-2.3.4/lib/active_support/message_verifier.rb:28:in `verify'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:156:in `unmarshal'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/cookie_store.rb:145:in `load_session'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:62:in `block in load!'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:70:in `stale_session_check!'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:61:in `load!'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/session/abstract_store.rb:28:in `[]'
/usr/lib/ruby/gems/1.9.1/gems/actionpack-2.3.4/lib/action_controller/request_forgery_protection.rb:102:in `form_authenticity_token'
(eval):2:in `form_authenticity_token'
/home/matt/tests/app/views/tests/new.html.erb:3:in `_run_erb_app47views47tests47new46html46erb'
/home/matt/tests/app/controllers/tests_controller.rb:29:in `new'
And when I try to install mongrel as root or regular user, I get this:
Building native extensions. This could take a while...
ERROR: Error installing mongrel:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
checking for main() in -lc... yes
creating Makefile
make
gcc -I. -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -D_FILE_OFFSET_BITS=64 -fPIC -march=i686 -mtune=generic -O2 -pipe -O2 -g -Wall -Wno-parentheses -fPIC -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: In function 'header_done':
http11.c:172: error: 'struct RString' has no member named 'ptr'
http11.c:172: error: 'struct RString' has no member named 'ptr'
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
Gem files will remain installed in /usr/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5 for inspection.
Results logged to /usr/lib/ruby/gems/1.9.1/gems/mongrel-1.1.5/ext/http11/gem_make.out
Please help.
Offline
Hi!
I don't know if you've yet found a solution to it, but afaik this problem is caused by the ruby 1.9 version, because they don't use certain arrays anymore to compile.
You gotta wait for mongrel 1.1.6 or use webrick... oooooooor get ruby 1.8. That might solve the problem, but I haven't tried that yet.
If on the other hand it is related to gcc and make, then you're doomed and most definitely have to wait for a newer gem version. Uh yay... I've had this fun with the mysql gem last weekend... :>
Anyways, would be cool to hear, what you have found out...
Speak when you are angry and you will make the best speech you'll ever regret.
Offline
Just use thin for development, it's newer and better than mongrel.
Run your server with
script/server thin
or
thin start
in your Rails root.
Offline