ruby-on-rails,ruby-on-rails-3.1,phusion-passenger,asset-pipelineRelated issues-Collection of common programming errors
Peter Mortensen
architecture ruby-on-rails node.js rewrite
Please tell me if:Node.js will make our site faster! Node.js will consume fewer server resources, we can save money! Node.js will make us more productive! Node.js means we can share client and server side JavaScript code.To clarify, we’re rewriting a frontend server, which will talk to our existing Ruby on Rails application as an API. Meanwhile, we’ll refactor our Ruby on Rails application into services.More details on the existing architecture:Memcached for HTML partials caching Redis for sessi
airlok
ruby-on-rails ruby ubuntu rvm linkparser
I am using rvm, ruby 1.9.3, link-grammar (sudo apt-get install link-grammar), and pkg-config. I have the same setup on OSX, and it works great.Running ‘gem install linkparser’ fails on this:/usr/local/include/link-grammar/link-includes.h:16:36fatal error: link-grammar/api-types.h: No such file or directoryI’ve tried installing link-grammer manually as well, then running:gem install linkparser — –with-link-grammar=/usr/local gem install linkparser — –with-link-grammar=/usr/share gem install l
jackerman09
ruby-on-rails git heroku
I have been working on this rails project for weeks (it is deployed using Heroku), pushing to GitHub frequently without a problem. I am now getting this error:error: The requested URL returned error: 504 while accessing https://github.com/my_git_name/my_repository_name.git/info/refs?service=git-receive-pack fatal: HTTP request failedAny idea what might be causing this? Thanks!
bharath
ruby-on-rails git rubygems bundler ruby-on-rails-3.2
I Have This in my GemFilesource ‘https://rubygems.org’gem ‘rails’, ‘3.2.3’# Bundle edge Rails instead: # gem ‘rails’, :git => ‘git://github.com/rails/rails.git’gem ‘sqlite3’gem “nested_form”, :git => “https://github.com/ryanb/nested_form.git” gem ‘lazy_high_charts’, :git => “https://github.com/michelson/lazy_high_charts.git”# Gems used only for assets and not required # in production environments by default. group :assets dogem ‘sass-rails’, ‘~> 3.2.3’gem ‘coffee-rails’, ‘~> 3.
cjm2671
ruby-on-rails ruby rescue
I’m trying to run a command that might fail sometimes. When it fails, it throws an exception.What I’d like it to do is just log the error quietly and continue executing the next line below it, rather than aborting and going into the ‘rescue’ block. How should I approach this?My current code is as follows:rescue_from ‘Gibbon::MailChimpError’ do |exception|logger.error(“MAILCHIMP: #{exception}”)endWhen I call the Mailchimp API, sometimes there is an error, and this disrupts the flow of my applicat
dachi
ruby-on-rails git openshift
When trying to clone my Rails application via Git, I am geting:Cloning into ruby… ssh: Could not resolve hostnameruby-xxxxxxxxx.rhcloud.com: nodename nor servname provided, or notknown fatal: The remote end hung up unexpectedlyFor this, I am running the following command:$ git clone ssh://[email protected]/~/git/ruby.git/I can access the app from the web console & have installed the rhc gem & the set up was successful.Anybody know what I can do to try
stefkas
ruby-on-rails git heroku push
When I git push on heroku, I receive this fatal: Not a git repository (or any of the parent directories): .git error many times. Everything works fine in my application and the push completes normally. I just wonder why this happens. I also see the same message 4-5 times in my logs in heroku, when a scheduler task runs. Any idea? Thanks!git push staging masterCounting objects: 41, done. Delta compression using up to 4 threads. Compressing objects: 100% (21/21), done. Writing objects: 100% (21/2
Zack
ruby-on-rails ruby shell heroku
Im getting a fatal error in my Ruby and Rails Command Line when I try to bundle install –without productionfor Heroku.I’m following the instructions here: http://installfest.railsbridge.org/installfest/create_and_deploy_a_rails_appThis step is in 7.2. Everything was working fine until this. Can anyone point me in the right direction as to why this is failing?It says something along the lines of ‘group’ no block given (yield) (LocalJumpError)ThanksEdit: Gemfilesource ‘https://rubygems.org’# Bun
Bram Jetten
javascript ruby-on-rails debian v8
I’m trying to deploy my Rails app to a new VPS which runs with Debian. I’m using Nginx and Phusion Passenger as my server.I’ve installed Node.js as a JavaScript runtime. Sadly I’m seeing the following error message:Fatal error in v8::V8::AddGCPrologueCallback() V8 is no longer usableEdit:It is fixed now. Apparently gr security was causing the error.
BoltClock
ruby-on-rails installation osx-lion
I’m a n00b eager to get my hands on Ruby on Rails (OSX 10.7). But first I need to install it. Now I’ve spend 9 hours trying to get it to work but it always fails when I try to create a new project:$ rails new /Users/tom/Documents/14-Utveckling/WhichTerminal exist identical README.rdoc identical Rakefile identical config.ru identical .gitignoreconflict Gemfile Overwrite /Users/tom/Documents/14-Utveckling/WhichTerminal/Gemfile? (enter “h” for help) [Ynaqdh] Yforce Gemfileexist app identic
simo
ruby-on-rails-3 postgresql ruby-on-rails-3.1 ubuntu-11.10
I am running my development on Ubuntu 11.10, and RubyMineHere is my development settings for the database.yml: which RubyMine created for medevelopment:adapter: postgresqlencoding: unicodedatabase: dcaclab_developmentpool: 5username: dcaclabpassword:when I try to run the app, I get this error below, it seems that I didn’t create a ‘dcaclab’ user yet, but, how can I create a user and grant it a database in postgres ? if this is the problem, then, what is the recommended tool to use in Ubuntu for
snowangel
ruby-on-rails heroku ruby-on-rails-3.1
This question is a bit like this one but its solutions don’t work for me. Using RVM, just upgraded to Rails 3.1 rc6. All working surprisingly smoothly except when I attempt to deploy to a new heroku Cedar staging stack I get an error: —–> Heroku receiving push —–> Ruby/Rails app detected —–> Installing dependencies using Bundler version 1.1.pre.8Running: bundle install –without development:test –path vendor/bundle –deploymentFetching dependency information from the API at ht
agente_secreto
ruby-on-rails ruby ruby-on-rails-3.1
I am trying ro upgrade my app to rails 3.1.1. I am following the railscasts tutorial, so I first updated to 3.0.9. I had a few problems with will_paginate but they were solved after updating to a newer version. Now all my tests are passing and I am trying to update to 3.1.1So I have modified my Gemfile to use Rails 3.1.1, but when I do bundle update, I get the following output (with some ruby errors in it, and a message about installing the development tools first).Edit: starting to think this h
Pavel
heroku ruby-on-rails-3.1 ruby-1.9.2 javascript-runtime
i am trying to instal therubyracer/ therubyracer-heroku to my app, cause it doesnt work in heroku server cause i dont have javascript runtime enviroment. when i am trying to install these gems it writes:Installing therubyracer-heroku (0.8.1.pre3) with native extensions C:/RailsInsta ller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/installer.rb:533:in `rescue in block in build_extensions’: ERROR: Failed to build gem native extension. (Gem::I nstaller::ExtensionBuildError)C:/RailsInstaller/Ruby1.9
Felipe Cypriano
sqlite3 heroku ruby-on-rails-3.1 bundler
I’m trying to deploy a Rails 3.1 application for the first time on Heroku. I set it to the Cedar stack, removed the sqlite3 gem but when I push the code to Heroku I get this error:—–> Installing dependencies using Bundler version 1.1.rcRunning: bundle install –without development:test –path vendor/bundle –deploymentFetching gem metadata from http://rubygems.org/……. (…)Installing rails (3.1.0)Installing sqlite3 (1.3.4) with native extensions Unfortunately, a fatal error has occurred.
at.
ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1 rubygems
I can’t seem to run bundle update on my Windows 7 machine with Ruby 1.9.3p194. I’ve installed the latest DevKit as well. bundle complains about the lack of a make command, I can’t find make on my hard drive (I searched). How do I get this to work?C:\website>bundle update Fetching gem metadata from http://rubygems.org/……… Using rake (0.9.2.2) Using i18n (0.6.1) Using multi_json (1.3.6) Using activesupport (3.2.8) Using builder (3.0.2) Using activemodel (3.2.8) Using erubis (2.7.0) Usi
w0lf
ruby-on-rails ruby ruby-on-rails-3.1 mongoid bson
When I execute the following command in the Rails project folder:gem install bson_extI get the this error:#result Building native extensions. This could take a while… ERROR: Error installing bson_ext:ERROR: Failed to build gem native extension./home/absolute/.rvm/rubies/ruby-1.9.3-p0/bin/ruby extconf.rb checking for asprintf()… yes checking for ruby/st.h… yes checking for ruby/regex.h… yes checking for ruby/encoding.h… yes creating Makefilemake compiling bson_buffer.c compiling cbson
jcollum
debugging ubuntu ruby-on-rails-3.1
I have a Rails app that has been running fine for months. The other day I went through the laundry list of upgrades in Ubuntu and installed them all. Suddenly, I can’t start my dev server because of failures in linecache. I’ve read various threads on this topic: ruby_threadptr_data_type errorRails with ruby-debugger throw Symbol not found: _ruby_current_thread (LoadError)http://isitruby19.com/linecachehttp://antisnatchor.com/debugging_ruby_1.9.3p125Installing linecache19 for Ruby 1.9.2 via rvmSt
Surjan Singh
ruby-on-rails ruby ruby-on-rails-3 ruby-on-rails-3.1
Hiall,I am new to ROR . I am trying to install rmagick on my local machine . When I try to install it everytime i get the following error : Please help me out with this situation .D:\ruby\bin>gem install rmagick –platform=ruby — –with-opt-lib=D:\ruby\Rmmagik\lib –with-opt-include=D:\ruby\Rmmagik\include Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing rmagick: ERROR: Failed to build gem native extension.D:/
Rahul
ruby-on-rails rubygems ruby-on-rails-3.1 mysql2
I am trying to install mysql2 gem in my windows machine and I get the following error. What should I do? Fetching: mysql2-0.3.10.gem (100%) Temporarily enhancing PATH to include DevKit… Building native extensions. This could take a while… ERROR: Error installing mysql2:ERROR: Failed to build gem native extension.D:/Program_Files/Ruby192/bin/ruby.exe extconf.rb checking for rb_thread_blocking_region()… yes checking for rb_wait_for_single_fd()… no checking for main() in -llibmysql… no
devnull
ruby-on-rails gem phusion-passenger
From terminal$ sudo gem install passenger Building native extensions. This could take a while… ERROR: Error installing passenger:ERROR: Failed to build gem native extension./Users/dan/.rvm/rubies/ruby-2.0.0-p0/bin/ruby extconf.rb extconf.rb:13:in `block in <main>’: Use RbConfig instead of obsolete and deprecated Config. extconf.rb:13:in `block in <main>’: Use RbConfig instead of obsolete and deprecated Config. make Makefile:104: *** missing separator. Stop.Gem files will remain
user94154
ruby ubuntu passenger phusion-passenger
From the console:adelevie@ubuntu:~$ gem install passengerBuilding native extensions. This could take a while…ERROR: Error installing passenger:ERROR: Failed to build gem native extension./usr/bin/ruby1.8 extconf.rb/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — mkmf (LoadError)from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require’from extconf.rb:8Gem files will remain installed in /home/adelevie/ruby/gems/gems/fastthread-1.0.7 for
gugguson
ruby-on-rails-3 haml phusion-passenger
I’m writing a Rails 3 application on Mac OSX and it runs fine under both development and production. When I deploy the app with Passenger I get a error in one of my views. This is how the view looks like:%p#refresh= link_to ‘Refresh’, ‘#’, id: “refreshAreaLink”#newAreaParagraph= link_to ‘New area’, ‘#’, id: “createNewAreaLink”- for area_group in AreaGroup.all.areaGroup= area_group.name%ul- for area in Area.find_all_by_area_group_id(area_group.id)%li.areaList= link_to area.name, area, :remote =
Aaron Gray
ruby-on-rails ruby apache phusion-passenger ruby-on-rails-2
Can’t make my rails 2.3.5 application work correctly with apache2. In apache errors log i get the following:/usr/lib/phusion_passenger/passenger-spawn-server:53:in `require’: no such file to load — phusion_passenger/utils (LoadError) from /usr/lib/phusion_passenger/passenger-spawn-server:53 [ pid=9437 file=ext/apache2/Hooks.cpp:727 time=2012-04-02 20:04:49.923 ]: Unexpected error in mod_passenger: Cannot spawn application ‘/home/user/projects/pname/trunk’: The spawn server has exited unexpected
Arty
ruby-on-rails passenger capistrano phusion-passenger
Trying to deploy my rails application but when access through web I’m getting 500 error saying that The application spawner server exited unexpectedly: Unexpected end-of-file detected.Exception class:PhusionPassenger::Railz::ApplicationSpawner::ErrorI googled the whole internet but found only couple of guys who had the same problem. One of them had it related to improper installation of facebooker gem, but I don’t even have it.Any ideas? I’ve been struggling with it past hoursI’m usingruby 1.9.1
wkhatch
ruby-on-rails character-encoding phusion-passenger
Ruby 1.9.2 Rails 3.0.9 ssl_requirement 1.3.2 passenger 3.0.8After updating ssl_requirement, when deploying the app I’m now getting Encoding::CompatibilityError in spawn manager exceptionsThe more details trace indicates that ssl_requirement is involved, during loading of required gems on startup:ssl_requirement.gemspec:11: invalid multibyte char (US-ASCII) /home/bill/.bundler/ruby/1.9.1/ssl_requirement-0db844a72f88/bartt-ssl_requirement.gemspec:11: invalid multibyte char (US-ASCII) /home/bill/.b
mpora
ruby-on-rails-3 phusion-passenger
I have a rails app that I uploaded to a server that uses Passenger. The error that is produced is:compile error PATH TO GEM FILE/Gemfile:28: syntax error, unexpected ‘:’, expecting kEND …ery-datatables-rails’, github: ‘rweng/jquery-datatables-rail… ^In the gem file, I have this:gem ‘jquery-datatables-rails’, github: ‘rweng/jquery-datatables-rails’which is the line it is failing on.What am I missing?
Ajedi32
ruby-on-rails phusion-passenger
I’m trying to get my Rails 3.2.8 app running on justhost.com’s web hosting platform and I’m having a few problems. The app works fine on WEBrick when I ssh into the server and run rails server, but passenger (the server platform provided by justhost) is having some issues:I don’t understand what this error means or have any idea on how to fix it. Could someone please point me in the right direction?In case this information is relevant, here are the contents of my .htaccess file:PassengerEnabled
Blu Dragon
apache-2.2 centos5 ruby selinux phusion-passenger
I have been trying to get Phusion Passenger running on 5.6 for the last couple of days with no luck. Initially, I started with Ruby 1.9.2 under RVM since the default Ruby on RHEL-based distros is quite old. I got evrything installed OK but ran into some issues. Thinking it was RVM, I completely removed it along with the default Ruby and installed Ruby Enterprise Ed. 1.8.7.2011-03 into /usr. I am still having the same issues.When I try to Passenger with the default setup instructions provided by
Sam Kong
apache-2.2 phusion-passenger
I have apache2 + Phusion Passenger(4.0.7). It didn’t work for a day and I found the following error log at the start of the errors. After that, the last error repeated.I restarted apache2 and it started working again.How do I prevent it from happening again?PHP Warning: PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626/suhosin.so’ – /usr/lib/php5/20090626/suhosin.so: cannot open shared object file: No such file ordirectory in Unknown on line 0 [ 2013-07-14 06:51:36.3453 26309/
Spencer Cooley
ruby-on-rails deployment heroku asset-pipeline
I am having a lot of trouble deploying a simple rails3.1 app. It seems like there are two main problems.Because of the asset pipeline, the assets are not loading in the production environment. I develop with the default db sqlite3. Heroku uses postgresql.Basically, I want my development-to-deploy workflow to be as seamless as possible. Can anyone recommend the best way to set up my development environment, so that when I $git push heroku, everything just works. I imagine that it is best to use p
thedeeno
ruby-on-rails caching asset-pipeline sprockets
In sprockets how do I detect if an asset is stale?I’ve tried the following and my results were unexpected:e = Rails.application.assets # sprockets env x = Rails.application.assets.indexe[‘path/to/my/asset’].body #=> prints assete[‘path/to/my/asset’].fresh?(x) #=> true# modify the asset file (to change mtime and digest)e[‘path/to/my/asset’].fresh?(x) #=> true#!? Why wasn’t that false?The caching mechanism confuses me. Further, when inspecting the asset it tells me that the mtime is the o
denishaskin
ruby-on-rails asset-pipeline
I clearly must be Doing Something Wrong here. I’m wrestling with the asset pipeline (again). I have a custom font, and it seems to me to get everything to compile properly I need to use asset_path() in multiple places, but it’s having an unexpected effect.I realize there are several ways to do this, but here’s what I have currently:In application.css.scss.erb:@import “<%= asset_path(“my-font.css”) %>”;my-font.css’s source file is app/assets/stylesheets/my-font.css.erb (it needs to be an .
Accipheran
javascript ruby-on-rails asset-pipeline rubber
After running a cap deploy, I’m getting an error when navigating to my site on the client:Uncaught SyntaxError: Unexpected token ‘<‘ application-[hash here].js line 1When I look at the file “application.js” on the client, it simply shows me a rendered version of my application.html.erb. The first line of that file is naturally <!DOCTYPE html> so it makes sense that it would get that error at line 1. But why would html be getting sent over in place of my javascript? I ran this same deplo
Sherwin Yu
ruby-on-rails coffeescript asset-pipeline execjs
In one of my Rails apps, ExecJS is not showing line numbers for coffeescript compilation errors. My compile error message will look like this:ExecJS::RuntimeError in Referrals#newShowing ~/MyApp/app/views/layouts/application.html.erb where line #6 raised:SyntaxError: unexpected IDENTIFIER(in ~/MyApp/assets/javascripts/utils.js.coffee)Note that there’s no line number for the coffee script source (line #6 is for the erb file).On another one of my apps, where I’m still getting the line numbers, a s
mmell
asset-pipeline
In Rails 3.2.3, the html head tag contains links to all the styleheets in app/assets/stylesheets even though only the stylesheet_link_tag only referenced ‘application’ and all of the links are broken. What’s wrong here:When config/environments/development.rb has config.assets.compress = trueand app/assets/stylesheets/application.rb contains*= require_tree .app/views/layouts/application.rb stylesheet section in the head tag contains only<%= stylesheet_link_tag( ‘application’ ) %>then there
weed
ruby-on-rails ruby coffeescript asset-pipeline
I want to deploy my Rails app to heroku but assets compile fails. In local environment, it works well.Your bundle is complete! It was installed into ./vendor/bundleCleaning up the bundler cache. —–> Writing config/database.yml to read from DATABASE_URL —–> Preparing app for Rails asset pipelineRunning: rake assets:precompilerake aborted!Error: Parse error on line 13: Unexpected ‘INDENT'(in /tmp/build_iztv4ybnwpqh/app/assets/javascripts/require_dir/view_after _key_recieve.js.coffee)Lo
rossmckelvie
ruby-on-rails ruby-on-rails-3 asset-pipeline rack
Serving assets has started creating this error today:!! Rack application returned nil body. Probably you wanted it to be an empty string? !! Unexpected error while processing request: undefined method `each’ for nil:NilClassI am using coffeescript and SCSS (application.js.coffee and application.css.scss)From Gemfile:group :assets dogem ‘sass-rails’, ‘~> 3.2.3’gem ‘compass-rails’gem ‘coffee-rails’, ‘~> 3.2.1’gem ‘marionette-rails’gem ‘uglifier’, ‘>= 1.0.3’ endUsing ruby 1.9.3-p392 and
Douglas
rake ruby-on-rails-3.2 capistrano asset-pipeline
I’m trying to deploy my app on a server with Capistrano. I ran the deploy:setup, and deploy:check with success.Some of the task of deploy:update passed with success, but the deploy:asset:precompile task seems to crash ruby.I tried to understand the cause of the error :It seems that the issue is linked to Rails Asset Pipeline and postgresql_adapter.I’m a bit lost as I don’t much about asset pipeline. The least that I know is that Asset Pipeline has to do with javascript and CSS stylsheet, so I do
Nathan Manousos
ruby-on-rails-3.1 coffeescript erb asset-pipeline
I have a file in my rails 3.1 project called: foo.js.coffee.erbconsole.log <?= 1+1 ?>This causes:throw Error(“ExecJS::ProgramError: Error: Parse error on line 1: Unexpected ‘COMPOUND_ASSIGN’\n (in /Users/trafnar/Sites/imagesnap/app/assets/javascripts/tiles.js.coffee.erb)”)Clearly the ERB is tripping it up. I thought Rails 3.1 allowed the use of an ERB preprocessor before coffeescript, why might this be failing?
Web site is in building