Hello I have problem to remote debugging rails app (deployed on vagrant vm) in Aptana 3.
Gemfile:
source 'https://rubygems.org'
gem 'rails', '3.2.3'
gem 'bootstrap-sass', '2.0.0'
gem 'bcrypt-ruby', '3.0.1'
gem 'linecache19', :git => 'git://github.com/mark-moseley/linecache'
gem 'ruby-debug-base19x', '~> 0.11.30.pre4'
gem 'ruby-debug19',:require => 'ruby-debug'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
group :development, :test do
gem 'sqlite3', '1.3.5'
gem 'rspec-rails', '2.9.0'
gem 'rb-inotify', '0.8.8'
gem 'libnotify', '0.5.9'
gem "watchr", "~> 0.7"
gem 'guard-rspec', '0.5.5'
gem 'guard'
gem 'annotate', '~> 2.4.1.beta'
gem 'sextant'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '3.2.4'
gem 'coffee-rails', '3.2.2'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
gem 'therubyracer'
gem 'uglifier', '1.2.3'
end
gem 'jquery-rails', '2.0.0'
group :test do
gem 'capybara', '1.1.2'
gem 'spork', '~> 0.9.0'
gem 'factory_girl_rails', '1.4.0'
end
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
rails s -u:
=> Booting WEBrick
=> Rails 3.2.3 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
=> Debugger enabled
[2012-06-01 06:41:48] INFO WEBrick 1.3.1
[2012-06-01 06:41:48] INFO ruby 1.9.3 (2011-10-30) [i686-linux]
[2012-06-01 06:41:48] INFO WEBrick::HTTPServer#start: pid=14225 port=3000
so debug mode is enabled
In Aptana 3:
Debug -> Debug Configurations -> Remote Ruby Debug Sessions, create new with:
host: localhost
port: 3000
Tried to run 'Debug' but I still get Problem occured dialog with 'An internal error occurred during: "Launching rails".
null'
Any idea what to do to enable aptana 3 remote debugging?
Thank you.
Related
I have been using Kaminari since a while. I use to paginate generic arrays using the following line.
Kaminari.paginate_array([1,2,3]).page(1).per(1)
That use to work before but I noticed that since yesterday this show the error
undefined method `page' for #<Kaminari::PaginatableArray:0x007f8e5d10fde0>
However calling page on ActiveRecord relation is working fine. something like this is working
User.page(1).per(1)
My Gem file
source 'https://rubygems.org'
ruby '1.9.3'
gem 'rails', '3.2.8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'mysql2'
gem 'pg'
# Ok lets try out the heroku business
gem 'heroku'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'coffee-rails', '~> 3.2.1'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', :platforms => :ruby
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-fileupload-rails'
gem 'jquery-rails'
gem 'jquery-ui-rails'
# Twitter Boostrap and Upgrade dependencies
gem 'therubyracer'
gem 'less-rails'
gem 'twitter-bootstrap-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# To use Jbuilder templates for JSON
# gem 'jbuilder'
# Use unicorn as the app server
gem 'unicorn'
# Deploy with Capistrano
gem 'capistrano'
gem 'cap_bootstrap', github: 'benrs44/cap_bootstrap'
gem 'awesome_print'
group :test, :development do
gem 'rspec-rails', '>= 2.0.1'
gem "capybara-webkit"
gem 'capybara'
gem 'launchy'
gem 'selenium-webdriver'
gem 'shoulda-matchers'
gem 'ci_reporter'
gem "factory_girl_rails", "~> 4.0"
# DRb server RSpec
gem "spork-rails"
# To use debugger
gem 'debugger'
end
group :test do
gem "guard-rspec"
gem 'rb-fsevent', '~> 0.9.1'
gem 'database_cleaner'
gem 'fuubar'
end
#Image Uploader
gem 'carrierwave'
#Image Processor
gem "rmagick"
#Video Processor
gem 'video_info'
gem 'hpricot'
#Authenitcation
gem 'omniauth-facebook', '1.4.0'
#Messaging
gem 'mailboxer', github: 'rralston/mailboxer'
gem 'haml-rails'
gem 'simple_form'
#Gelocation
gem 'geocoder'
#Search
gem 'ransack'
# For easily making nouns possessive
gem 'possessive'
#Pagination
gem "kaminari"
gem 'will_paginate', '~> 3.0'
#Web App Monitoring
gem 'newrelic_rpm'
#FB Style Newsfeeds
gem 'public_activity'
# Heroku CDN Link to AWS
gem "asset_sync"
# Carrier Wave link to AWS S#
gem 'fog', '~> 1.12.1'
gem 'cancan'
# client side validtions
gem 'client_side_validations'
# tagging
gem 'acts-as-taggable-on'
# remote file uploads
gem "remotipart", "~> 1.2.1"
# social sharing
gem 'social-share-button'
gem 'devise', "~> 2.2.3"
gem 'omniauth'
gem 'devise-async'
running bundle show bundle show kaminari gives /Users/***/.rvm/gems/ruby-1.9.3-p448/gems/kaminari-0.14.1
Turned out to be that my colleague has added a configuration file for Kaminari and changed this page function with this line.
config.page_method_name = :kaminari_page
So instead of using Kaminari.paginate_array([1,2,3]).page(1).per(1) I should now use
Kaminari.paginate_array([1,2,3]).kaminari_page(1).per(1)
I cloned this https://github.com/xaviershay/enki and did the following modifications:
My Gemfile now looks like this:
source 'https://rubygems.org'
gem 'rails', '3.2.6'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.2.3'
end
group :production do
gem 'pg'
end
group :development do
gem 'mysql2', '~> 0.3.11'
end
platforms :jruby do
gem 'activerecord-jdbcsqlite3-adapter'
gem 'trinidad'
gem 'jruby-openssl'
end
gem 'jquery-rails'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug'
# Bundle the extra gems:
gem 'RedCloth', '~> 4.2.9', :require => 'redcloth'
gem 'ruby-openid', :require => 'openid'
gem 'rack-openid', :require => 'rack/openid'
gem 'aaronh-chronic', :require => 'chronic' # Fixes for 1.9.2
gem 'coderay'
gem 'lesstile'
gem 'formtastic'
gem 'will_paginate', '~> 3.0.2'
gem 'exception_notification', '~> 2.5.2'
gem 'open_id_authentication'
# Bundle gems for the local environment. Make sure to
# put test-only gems in this group so their generators
# and rake tasks are available in development mode:
group :test do
gem 'database_cleaner'
gem 'cucumber-rails', :require => false
gem 'cucumber-websteps', :require => false
gem 'factory_girl'
gem 'rspec'
gem 'nokogiri', '~> 1.5.0'
gem 'webrat'
end
group :development, :test do
gem 'rspec-rails'
end
And I also modified the database.yml file to look like this:
development:
adapter: mysql2
database: myblog_development
username: root
password:
host: localhost
test:
adapter: mysql2
database: myblog_test
username: root
password:
host: localhost
I am able to check the site in my local, but when trying to deploy to Heroku I get the following:
-----> Writing config/database.yml to read from DATABASE_URL
-----> Preparing app for Rails asset pipeline
Running: rake assets:precompile
rake aborted!
could not connect to server: Connection refused
Is the server running on host "127.0.0.1" and accepting
TCP/IP connections on port 5432?
Tasks: TOP => environment
(See full trace by running task with --trace)
Precompiling assets failed, enabling runtime asset compilation
Injecting rails31_enable_runtime_asset_compilation
Please see this article for troubleshooting help:
http://devcenter.heroku.com/articles/rails31_heroku_cedar#troubleshooting
I tried doing what they suggest in that last site, but still getting the same error. What am I missing?
In your application.rb file, add this line:
config.assets.initialize_on_precompile = false
Im using Ruby 1.9.3p0, Rails 3.1.2 with Apache and Passenger in Production. When I try to make a remote function, it throws me this error:
ActionView::MissingTemplate (Missing template video/loadVideo, application/loadVideo with
{:handlers=>[:erb, :builder], :formats=>[:js, "application/ecmascript", "application/x-
ecmascript", :html, :text, :js, :css, :ics, :csv, :xml, :rss, :atom, :yaml,
:multipart_form, :url_encoded_form, :json], :locale=>[:en, :en]}. Searched in
As you can see, there is no handler for :coffee, that's the reason why is not processing the file video/loadVideo.js.coffee; I run the command rake assets:precompile but nothing changes.
The Gemfile
source 'http://rubygems.org'
gem 'rails', '3.1.2'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'will_paginate', '~> 3.0'
gem "bcrypt-ruby", :require => "bcrypt"
gem 'mysql'
#Problems in Debian, the error was:
#Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs #for a list of available runtimes. (ExecJS::RuntimeUnavailable)
#Solution: http://stackoverflow.com/questions/6282307/rails-3-1-execjs-and-could-not-find-a-javascript-runtime
gem 'execjs'
gem 'therubyracer'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.5.rc.2'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', '0.8.2', :require => false
end
Change your Gemfile (move coffee-rails gem outside the assets group) or change your application.rb settings - for instance
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
# Bundler.require(*Rails.groups(:assets => %w(development test)))
# If you want your assets lazily compiled in production, use this line
Bundler.require(:default, :assets, Rails.env)
end
In development environment application by default loads all of gems from :default, :development, :test, :assets groups. Coffee handler comes from coffee-rails gem, so you have to load it.
I am unable to get growl notifications when i run $guard
Do i need any particular version for growl_notify?
Growl version = 1.2
Here is my gem file.
gem 'rails', '3.1.3'
gem 'sqlite3'
group :development, :test do
gem 'rspec-rails'
gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
gem 'launchy'
gem 'database_cleaner'
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
gem 'guard-rspec'
gem 'guard-livereload'
end
gem 'growl'
group :test do
gem 'guard-spork'
end
Error message when i install/ pub growl_notify in gemfile
JP:guard2 jayparteek$ guard
/Users/jayparteek/.rvm/gems/ruby-1.9.2-head#guard2/gems/rb-appscript-0.6.1/lib/appscript.rb:542:in `_send_command': CommandError (Appscript::CommandError)
OSERROR: -10000
MESSAGE: Apple event handler failed.
COMMAND: app("/Library/PreferencePanes/Growl.prefPane/Contents/Resources/GrowlHelperApp.app").register({:all_notifications=>["success", "pending", "failed", "notify"], :as_application=>"Guard", :default_notifications=>"notify"})
from /Users/jayparteek/.rvm/gems/ruby-1.9.2-head#guard2/gems/rb-appscript-0.6.1/lib/appscript.rb:642:in `method_missing'
Make sure you are running Growl 1.3.xx
In your Gemfile remove gem 'growl' and in your :test group add gem 'ruby_gntp' then run
$ gem uninstall growl_notify
$ bundle install
Should use following gemfile, with rails 3.1.3 & Growl ver 1.3.1
gem 'rails', '3.1.3'
gem 'sqlite3'
group :development, :test do
gem 'rspec-rails'
gem 'capybara', :git => 'git://github.com/jnicklas/capybara.git'
gem 'launchy'
gem 'database_cleaner'
gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i
gem 'guard-rspec'
# gem 'guard-livereload'
end
group :test do
gem 'guard-spork'
gem 'ruby_gntp'
end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', '~> 3.1.5'
gem 'coffee-rails', '~> 3.1.1'
gem 'uglifier', '>= 1.0.3'
end
gem 'jquery-rails'
# To use ActiveModel has_secure_password
# gem 'bcrypt-ruby', '~> 3.0.0'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
I am trying to integrate refinerycms into an existing application. Here is my gemfile
source 'http://rubygems.org'
gem 'rails', '~> 3.1.0.rc8'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'sqlite3'
gem 'mysql2'
gem "arel"
gem 'pdfkit'
# Gems used only for assets and not required
# in production environments by default.
group :assets do
gem 'sass-rails', "~> 3.1.0.rc"
gem 'coffee-rails', "~> 3.1.0.rc"
gem 'uglifier'
end
gem 'jquery-rails'
gem 'aws-s3', :require => 'aws/s3'
gem 'stomp'
# Use unicorn as the web server
# gem 'unicorn'
# Deploy with Capistrano
# gem 'capistrano'
# To use debugger
# gem 'ruby-debug19', :require => 'ruby-debug'
group :test do
# Pretty printed test output
gem 'turn', :require => false
gem 'cucumber-rails'
gem 'database_cleaner'
gem 'factory_girl'
end
gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git'
gem 'refinerycms-generators', :git => 'git://github.com/resolve/refinerycms-generators.git'
gem 'seo_meta', :git => 'git://github.com/parndt/seo_meta.git'
# gem 'refinerycms-i18n', '~> 2.0.0', :git => 'git://github.com/resolve/refinerycms-i18n.git'
gem 'devise', '~>1.4.0'
I am following this tutorial: http://refinerycms.com/guides/attaching-refinery-cms-to-an-existing-rails-application
When I get to the rails generate refinerycms part, I receive the following error: Could not find generator refinerycms.
Any ideas on why this is happening?
Env:
rvm 1.6.30
ruby 1.9.2p180
Rails 3.1.0.rc8
The answer is to run the following command:
rails g refinery:cms