Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

seventhsense's Profile

GitHub User: seventhsense

Comments by seventhsense

Avatar

I've successed to deploy my private_sub app to heroku today
I'dont understand about rack application yet
anyway, for Faye server in Gemfile I added 3gems , private_pub, thin, and foreman
and make file 'Procfile' in rails root, like this

ruby
 web: bundle exec thin -p $PORT -e $RACK_ENV -R private_pub.ru start

then git push heroku master as usual, and done
When you access faye server address, if you show message 'Sure you're not looking for /faye ?' ,
faye server is good working.

Avatar

Hi
I tried this gem today
if you follow this video, your faye server :9292 is in production env, but your rails server :3000 is in development env.
so when you access from remote anything but localhost, you describe your faye server address in "config/private_pub.yml".
like this....
development:
server: "http://192.168.1.20:9292/faye"
secret_token: "secret"

i hope it will be help

Avatar

I think you need "%" like this if you try the last tutorial .

ruby
class CategoriesController < ApplicationController
  def index
    @categories = Category.order(:name).where("name like ?", "%#{params[:term]}%")
    render json: @categories.map(&:name)
  end
end
Avatar

I suppose ,it will not work on rails 3.2
Following worked on my enviroment.

1 add Gemfile and bundle

ruby
group :test do
  gem 'rspec-rails'
  gem 'cucumber-rails'
  gem 'database_cleaner'
  gem 'factory_girl_rails'
end

2 install them

bash
rails g rspec:install
rails g cucumber:install

rails g factory_girl:model YourModelName --dir=spec/factories

3 add features/support/env.rb

ruby
require 'factory_girl_rails'

4 make your *.feature and *_steps.rb file

Now cucumber dosnt use webrat but capybara . I cant find steps file for capybara. so you have to make steps.rb file by yourself,
referencing to https://github.com/jnicklas/capybara.

Avatar

It works well in rails 3.2.3 with small change.
Be carefull , 'var saveURL' changed to 'var saveUrl' at the latest version of mercury.
Thanks.