Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | Couchbase | Couchbase Server 2.0

rails generate couchbase:view DESIGNDOCNAME VIEWNAME will not create Production View and errors out.

1 reply [Last post]
  • Login or register to post comments
Wed, 12/12/2012 - 23:40
jabberfest
Offline
Joined: 12/12/2012
Groups: None

If you are having errors occur when you try to launch rails or if you add a view to a Couchbase::Model object read on!

If you create a view using the rails generator in the couchbase model gem, make sure you either delete the reduce.js template or actually comment in code.

If you leave the file full of only comments, the parser/view creator function blows up.

------------------------------------------------
http://www.couchbase.com/issues/browse/RCBC-95

I found this by digging around, but it doesn't look like the fixed version has been released?

I still get the not helpful error message:

/usr/local/lib/ruby/gems/1.9.1/gems/couchbase-1.2.0/lib/couchbase/bucket.rb:165:in `continue': failed to execute HTTP request (key="_design/category_column", status="400" (Bad Request), error=0x00) (Couchbase::Error::HTTP)

The fixed version would say

SERVER: invalid_design_document: Syntax error in the map function of the view `by_date': SyntaxError: Unexpected end of input (Couchbase::Error::View)

Top
  • Login or register to post comments
Thu, 12/13/2012 - 05:56
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

---------- Forwarded message ----------
From: Fernando Arias
Date: Thu, Dec 13, 2012 at 11:01 AM
Subject: Re: Creating Views with Couchbase model ORM not working (RESOLVED)
To: Sergey Avseyev
 
 
I sent another e-mail. The issue was the reduce.js file generated by the generator was causing the issue.
It does not like to process a file if it contains 100% comments.

I will check if it is bug in couchbase-model gem

__________________

Find me on FreeNode IRC in #libcouchbase channel

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker