Displaying 20 results from an estimated 500 matches similar to: "some routes don't load in production"
2010 Dec 01
0
Thinking sphinx + rails 3 issue in results set
Hi All,
I am using rails 3.0 and i installed sphinx and added the following to
gemfile gem ''thinking-sphinx'', ''2.0.0'', :require => ''thinking_sphinx''
My structure is like below:
==========================
Model:
=====
class User < ActiveRecord::Base
include ActionView::Helpers::UrlHelper
has_one :profile, :class_name =>
2012 Jun 19
2
Thinking Sphinx Problem
Hi,
I am using *Thinking Sphinx version 2.0.11 *in one of my project. To create
an index I ran* **rake thinking_sphinx:index *and I got the following error
Generating Configuration to /home/saidev/Ubuntu
One/burgundy/ssearch/config/development.sphinx.conf
rake aborted!
At least one field is necessary for an index
Tasks: TOP => thinking_sphinx:index
(See full trace by running task with
2011 Nov 02
1
getting devise to return json data when signing out
Hi all,
In curl (the command line program), I can successfully log a user in
using devise:
def create
respond_to do |format|
format.json {
if user_signed_in?
return render :json => {:success => true, :errors =>
["Already logged in."]}
end
resource = warden.authenticate!(:scope =>
resource_name, :recall =>
2011 Jun 13
0
Devise Authorization Error
Hello everyone,
I am new to rails and I am having some trouble getting the Devise
authorization plugin working. I can get the login page to display, but
when I enter the credentials for a known user (I seeded an account to
the database) it just says "Invalid email or password," even though
I''m 100% sure I entered the right information, and redirects me to the
login form.
2008 Sep 24
2
Thinking_sphinx indexing problem on production
Hello,
I have been using Sphinx with Thinking_sphinx plugin which works well on
local development environment, but once I move it to production (shared
host) I get this error and I''m not sure why
linkamed-sE8khXQTlBmcZ8xLbwwaNw@public.gmane.org [~/public_html/linko/current/config]# rake
thinking_sphinx:index RAILS_ENV=production
(in
2010 Sep 03
1
Action Controller Error: undefined local variable or method `current_user'
Newbie learning Rails. I''m currently on Chp9 here:
http://railstutorial.org/chapters/sign-in-sign-out#top
At the end of the tutorial, rails is erroring (see below). being new
to Rails and after having checked the tutorial... How do you resolve
this kind of error. It''s saying current_user is not defined, and it is
supposed to be defined with/Sites/sample_app/app/helpers/
2013 Jul 05
0
Sign in and sign out
Hello,
My name is Javier Molina and I am programming a simple app to manage users
in Ruby on Rails.
I read RoR Tutorial
from http://ruby.railstutorial.org/chapters/sign-in-sign-out#top to sign in
and sign out my app. I implemented the same configuration as it said:
*sessions_helper.rb*
def sign_out
self.current_user = nil
cookies.delete(:remember_token)
end
2011 Feb 19
1
undefined method `map' for nil:NilClass for rails 2.3.2
Hai guys!
When i try to do rake gems:install and rake gems:refresh_specs in my app
below error is occurred. please give some solution for this.
config.gem: Unpacked gem authlogic-2.1.3 in vendor/gems has no specification
file. Run ''rake gems:refresh_specs'' to fix this.
rake aborted!
undefined method `map'' for nil:NilClass
enivorment.rb
RAILS_GEM_VERSION =
2010 Jul 14
1
Sphinx search not indexing the new record
Hi,
I have an application which is doing search using "sphnix" search.
Everything is working fine but whenever user adding new record it is not
able to index. For that I have to again reindex the all records.
My user model is like this
class User < ActiveRecord::Base
define_index do
indexes first_name
indexes last_name
indexes email
end
end
Can anyone tell me how to
2011 Jul 14
10
Devise confusing routes
I had a similar problem yesterday.
I would go to the root of my site and I would get a Too Many Redirects
message. It seems like there was an infinite loop. After struggling for
over an hour yesterday late at night, it seemed like I fixed it.
But now, when I want to create a New User, it''s redirecting me to the
Sign In screen. Seems like I didn''t fix the problem completely.
I
2008 May 21
2
How to know the environment (development/test/production) inside a worker
Hi Guys,You can start backgroundRb in different environments using -e
option.
./script/backgroundrb -e production
I like to run a rake task from my worker - something like rake
RAILS_ENV=proper_environment thinking_sphinx:start
I am not sure how to figure out the environment with which the backgroundRb
is started from inside a worker task. Any help is appreciated. Thanks for
your time.
Regards
2013 Jul 04
3
Rspec devise, testing extended RegistrationController action destroy
Hi everyone,
I have devise 1.5.4 working with rails 3.0.20 and ruby 1.8.7 .
I have extended the destroy action from the RegistrationController, to soft
delete users instead of really deleting them from the database.
def destroy
# raise resouce.inspect # this is just to see if the test hits the
action
resource.soft_delete
set_flash_message :notice, :destroyed
sign_out resource
2010 Sep 30
5
response.should have_text leads to undefined method `has_text?'
One of my controllers directly renders some JSON output that I would
like to test with RSpec. For that I use ''response.should
have_text("foobar")'' in my spec file, but that leads to a
Failure/Error: response.should have_text("enim")
undefined method `has_text?'' for #<ActionController::TestResponse:
0xb6736944>
I read here somewhere that webrat
2008 Jan 03
1
properly escaping special characters in AAF?
For most cases, I''ve got search working in Rails as follows:
## controller:
term = params[:search][:term]
@results = MyModel.find_by_contents "#{term}*"
The ''*'' character is appended to the search term so that searches match
anything that begins with ''term''. For the most part, this is great, but
let''s say term is equal to
2013 Mar 20
2
Rspec + Devise + BaseController
Hello there,
I''m creating a base controller for the admin section of a project. All
controllers whitin the admin section will inherit from it.
#####################################################
#app/controllers/admins/base_controller.rb
class Admins::BaseController < ApplicationController
layout "admin_cms"
before_filter :authenticate_admin!
end
2013 Oct 07
0
rails_admin problem in raoutes, parallel login area in devise
hello friends,
i am using rails_admin as webapp admin interface. it create a User model by
default using Devise gem. after that i am creating another authorization
area member. now /admin route change to /member/sign_in from user/sign_in.
any body have idea how to create a parallel login area in devise with
rails_admin.
/admin => /user/sign_in (default)
after
* rails g devise member*.
it
2013 Aug 22
1
duplicated log lines in console
my app seems to be running fine in dev mode ( Rails4, Devise, OAuth2 ,
Doorkeeper ) but looking at the console , I can see all log lines
duplicated ....
where should I look for any tricky bug or missing param ?anyway to get more
info on what''s happening ? thanks a lot for feedback
(ruby-2.0.0@rails40)$ rails server -p 4000
=> Booting WEBrick
=> Rails 4.0.0 application starting
2006 Apr 25
2
Bug in Rails 1.1 implementation of before_filters
I just spent a few hours tracking down a bug in Rails 1.1, so I thought
I''d post the issue and a workaround just in case anyone else hits it.
I designed a security enhancement so that controller methods can be
protected by preceding them with a role. The standard Ruby
method_added() callback is used to detect when controller methods are
added, and then I manipulate the
2011 Sep 24
0
Redirecting devise after login
hi,
i am using devise gem in my app for authentication. if i enter
link1 -> http://localhost:3000/users/sign_in,
once i login, it will be redirected to
link2 -> http://localhost:3000/user/dashboard.
if i can add new posts or comments for that user using this link
link3 ->
http://localhost:3000/community_managers/posts/new/2/Facebook
lets say i am using
2007 Dec 20
0
Relative URL fix
Hi Facebookers,
I have been working on a change to facebooker to allow facebook and
non-facebook apps to exist on the same code-base. I modified the url
rewriting in facebooker a bit so that it would continue to use the
facebook relative url when needed but not prepend the facebook app
name to controller paths that didn''t have anything to do with your
facebook app.
Here is the