Dreamhost: Ruby (Rack) application could not be started - ruby-on-rails-3

I have been working on this problem in last two days using [http://jackassofalltrades.org/2012/02/updating-to-a-newer-rails-on-dreamhost][1]/ instruction. I have looked at other ruby on rails and dreamhost issues and instructions, but they seemed out of date. e.g 2010 etc. Moreover, I do aware of heroku which is very easy to deploy but expensive to keep running for my small project. So here are my problems.
Ruby (Rack)application could not be started - a mixture of two Ruby versions: Ruby 1.8 and 1.9 - when visiting to my website via browser.
I am unsure whether the gemset rails_michaelcollins_com remains true when i exit the terminal because every time I log in, the arrow to the particular gemset have been missing from "rvm gemset list".
Rails console error message stating "Could not find a JavaScript runtime" despite that I have Execjs 1.3.1 according to "bundle show" in rails.michaelcollins.com folder.
Thank you kindly in advance
Error mesage: Ruby (Rack) application could not be started
Application root: /home/miccol2/rails.michaelcollins.com
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb 10 in `exit'
/usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb 10
/usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `require'
/home/miccol2/rails.michaelcollins.com/config/boot.rb 6
/usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
/home/miccol2/rails.michaelcollins.com/config/application.rb 1
/usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
/home/miccol2/rails.michaelcollins.com/config/environment.rb 2
/usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
/usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require' config.ru 3
/usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in `instance_eval'
/usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in `initialize'
config.ru 1 in `new'
config.ru
[oslo]$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
[oslo]$ which ruby
/home/miccol2/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
[oslo]$ rails -v
Rails 3.2.3
[oslo]$ which rails
/home/miccol2/.rvm/gems/ruby-1.9.3-p194/bin/rails
[oslo]$ rvm -v
rvm 1.13.4 (stable) by Wayne E. Seguin <wayneeseguin#gmail.com>, Michal Papis <mpapis#gmail.com> [https://rvm.io/]
[oslo]$ rvm gemset list
gemsets for ruby-1.9.3-p194 (found in /home/miccol2/.rvm/gems/ruby-1.9.3-p194)
global
rails_michaelcollins_com
[oslo]$ rvm gemset use rails_michaelcollins_com
Using ruby-1.9.3-p194 with gemset rails_michaelcollins_com
[oslo]$ rvm gemset list
gemsets for ruby-1.9.3-p194 (found in /home/miccol2/.rvm/gems/ruby-1.9.3-p194)
global
=> rails_michaelcollins_com
[oslo]$
[oslo]$ rails console
/home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/execjs-1.3.1/lib/execjs/runtimes.rb:50:in `autodetect': Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable)
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/execjs-1.3.1/lib/execjs.rb:5:in `<module:ExecJS>'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/execjs-1.3.1/lib/execjs.rb:4:in `<top (required)>'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/coffee-script-2.2.0/lib/coffee_script.rb:1:in `<top (required)>'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/coffee-script-2.2.0/lib/coffee-script.rb:1:in `<top (required)>'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/coffee-rails-3.2.2/lib/coffee-rails.rb:1:in `<top (required)>'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `each'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:66:in `block in require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `each'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler/runtime.rb:55:in `require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#global/gems/bundler-1.1.3/lib/bundler.rb:119:in `require'
from /home/miccol2/rails.michaelcollins.com/config/application.rb:7:in `<top (required)>'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/railties-3.2.3/lib/rails/commands.rb:39:in `require'
from /home/miccol2/.rvm/gems/ruby-1.9.3-p194#rails_michaelcollins_com/gems/railties-3.2.3/lib/rails/commands.rb:39:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
[oslo]$
[oslo]$ bundle show
Gems included by the bundle:
* actionmailer (3.2.3)
* actionpack (3.2.3)
* activemodel (3.2.3)
* activerecord (3.2.3)
* activeresource (3.2.3)
* activesupport (3.2.3)
* arel (3.0.2)
* builder (3.0.0)
* bundler (1.1.3)
* coffee-rails (3.2.2)
* coffee-script (2.2.0)
* coffee-script-source (1.3.1)
* erubis (2.7.0)
* execjs (1.3.1)
* hike (1.2.1)
* i18n (0.6.0)
* journey (1.0.3)
* jquery-rails (2.0.2)
* json (1.7.1)
* mail (2.4.4)
* mime-types (1.18)
* multi_json (1.3.4)
* mysql2 (0.3.11)
* polyglot (0.3.3)
* rack (1.4.1)
* rack-cache (1.2)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.2.3)
* railties (3.2.3)
* rake (0.9.2.2)
* rdoc (3.12)
* sass (3.1.17)
* sass-rails (3.2.5)
* sprockets (2.1.3)
* thor (0.14.6)
* tilt (1.3.3)
* treetop (1.4.10)
* tzinfo (0.3.33)
* uglifier (1.2.4)
[oslo]$

It looks like execjs can't find it a runtime JS server.
See this for morre information:
https://github.com/sstephenson/execjs
Do you need that gem? If so, you'll need to install a runtime JS server. One widely used one is https://github.com/cowboyd/therubyracer .
To install that runtime JS server, add this line to your Gemfile:
gem "therubyracer", :require => 'v8'

You've bundled execjs but it can't find a Javascript runtime, like, say, node.js.
If you truly need execjs, then install node.js.
Also, be sure that your PATH environment variable includes the path to your Javascript runtime installation before starting up Rails.

Related

rails server in debug mode

When I try to run rails server in debugger mode using "rails server --debugger". I am getting the following error on my console.
/home/navyug/.rvm/gems/ruby-1.9.3-p194#global/gems/rake-0.9.2.2/lib/rake/ext/module.rb:36:in `const_missing': uninitialized constant Debugger::LocalInterface::Readline (NameError)
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:55:in `block (2 levels) in initialize'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:53:in `each'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:53:in `block in initialize'
from /home/navyug/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /home/navyug/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/open-uri.rb:35:in `open'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:52:in `initialize'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:61:in `new'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:61:in `initialize'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:9:in `new'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:9:in `<module:Debugger>'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:8:in `<top (required)>'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/rack/debugger.rb:9:in `initialize'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:295:in `new'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:295:in `block in build_app'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:291:in `reverse_each'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:291:in `build_app'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:301:in `wrapped_app'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/server.rb:252:in `start'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands/server.rb:70:in `start'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:55:in `block in <top (required)>'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:50:in `tap'
from /home/navyug/.rvm/gems/ruby-1.9.3-p194/gems/railties-3.2.7/lib/rails/commands.rb:50:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
RubyGems Environment
RUBYGEMS VERSION: 1.8.24
RUBY VERSION: 1.9.3 (2012-04-20 patchlevel 194) [i686-linux]
INSTALLATION DIRECTORY: /home/navyug/.rvm/gems/ruby-1.9.3-p194
RUBY EXECUTABLE: /home/navyug/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
EXECUTABLE DIRECTORY: /home/navyug/.rvm/gems/ruby-1.9.3-p194/bin
RUBYGEMS PLATFORMS:
ruby
x86-linux
GEM PATHS:
/home/navyug/.rvm/gems/ruby-1.9.3-p194
/home/navyug/.rvm/gems/ruby-1.9.3-p194#global
GEM CONFIGURATION:
:update_sources => true
:verbose => true
:benchmark => false
:backtrace => false
:bulk_threshold => 1000
REMOTE SOURCES:
http://rubygems.org/
I think the Readline package is missing in your setup. Since you are using RVM, try and install the readline package via rvm. These links might be helpful:
Previous similar SO question related to readline problem
Fixing Readline for the Ruby on Rails console
RVM package: Readline

Dreamhost: two different Ruby versions and gemsets?

I am using dreamhost shared server. I get this error message, I do not understand what these error means. Does this shows passenger uses dreamhost default ruby 1.8 instead of my local 1.9.3? These error messages shows passesnger is using usr/lib/ instead of my home folders. Thanks in advance.
In config/environmnet.rb:
# Load the rails application
require File.expand_path('../application', __FILE__)
# Initialize the rails application
RailsMichaelcunnaneCom::Application.initialize!
.
0 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb 10 in `exit'
1 /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/setup.rb 10
2 /usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `gem_original_require'
3 /usr/lib/ruby/1.8/rubygems/custom_require.rb 36 in `require'
4 /home/miccun2/rails.michaelcunnane.com/config/boot.rb 6
5 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
6 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
7 /home/miccun2/rails.michaelcunnane.com/config/application.rb 1
8 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
9 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
10 /home/miccun2/rails.michaelcunnane.com/config/environment.rb 2
11 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `gem_original_require'
12 /usr/lib/ruby/1.8/rubygems/custom_require.rb 31 in `require'
13 config.ru 3
14 /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in `instance_eval'
15 /usr/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/builder.rb 46 in `initialize'
16 config.ru 1 in `new'
17 config.ru 1
Ruby version:
miccun2#oslo:~/rails.michaelcunnane.com$ ruby -v
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
miccun2#oslo:~/rails.michaelcunnane.com$ which ruby
/home/miccun2/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
Rails version & up and running
miccun2#oslo:~/rails.michaelcunnane.com$ rails -v
Rails 3.2.3
miccun2#oslo:~/rails.michaelcunnane.com$ which rails
/home/miccun2/.rvm/gems/ruby-1.9.3-p194/bin/rails
miccun2#oslo:~/rails.michaelcunnane.com$ rails console
Loading development environment (Rails 3.2.3)
1.9.3p194 :001 > exit
RVM version and gemset selection
miccun2#oslo:~/rails.michaelcunnane.com$ rvm gemset list
gemsets for ruby-1.9.3-p194 (found in /home/miccun2/.rvm/gems/ruby-1.9.3-p194)
global
rails_michaelcunnane_com
miccun2#oslo:~/rails.michaelcunnane.com$ rvm gemset use rails_michaelcunnane_com --default
Using ruby-1.9.3-p194 with gemset rails_michaelcunnane_com
Bundle Show after Bundle installation
miccun2#oslo:~/rails.michaelcunnane.com$ bundle show
Gems included by the bundle:
* actionmailer (3.2.3)
* actionpack (3.2.3)
* activemodel (3.2.3)
* activerecord (3.2.3)
* activeresource (3.2.3)
* activesupport (3.2.3)
* arel (3.0.2)
* builder (3.0.0)
* bundler (1.1.3)
* coffee-rails (3.2.2)
* coffee-script (2.2.0)
* coffee-script-source (1.3.1)
* erubis (2.7.0)
* execjs (1.3.2)
* hike (1.2.1)
* i18n (0.6.0)
* journey (1.0.3)
* jquery-rails (2.0.2)
* json (1.7.1)
* mail (2.4.4)
* mime-types (1.18)
* multi_json (1.3.4)
* polyglot (0.3.3)
* rack (1.4.1)
* rack-cache (1.2)
* rack-ssl (1.3.2)
* rack-test (0.6.1)
* rails (3.2.3)
* railties (3.2.3)
* rake (0.9.2.2)
* rdoc (3.12)
* sass (3.1.17)
* sass-rails (3.2.5)
* sprockets (2.1.3)
* sqlite3 (1.3.6)
* thor (0.14.6)
* tilt (1.3.3)
* treetop (1.4.10)
* tzinfo (0.3.33)
* uglifier (1.2.4)
miccun2#oslo:~/rails.michaelcunnane.com$
.
Last time I deployed a Rails 3 application Dreamhost didn't offer 1.9.2. So my app used default 1.8.7. I think they still don't offer 1.9.2.
I didn't use RVM, I wanted that at first but I think it is too much of a hassle. Dreamhost Wiki has information but it was unsupported. So no help from Dreamhost if things go wrong. No help also when using your own 1.9.2.
On my laptop I use RVM of course but on Dreamhost PS just Dreamhost Ruby 1.8.7. The only thing I needed to change to get my Passenger Rails 3 app working was .gemrc in home directory which only has
gemhome: /home/myuser/.gems/
gempath:
- /home/myuser/.gems/

Activerecord errror after upgrading from rails 3.0.0 to 3.0.11 - table doesn't exist

I upgraded from rails 3.0.0 to 3.0.11 (don't want to move to 3.1 yet, for various reasons)
I changed the following in my Gemfile:
-gem 'rails', '3.0.0'
-gem 'mysql2', "0.2.6"
+gem 'rails', '3.0.11'
+gem 'mysql2', "~>0.2.7"
Fired up console and tried:
PopularMedia.where(:media_type => 1).all
and got this:
ActiveRecord::StatementInvalid: Mysql2::Error: Table 'matcha_development.popular_media' doesn't exist: SELECT `popular_media`.* FROM `popular_media` WHERE `popular_media`.`id` = 1
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.2.18/lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `query'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.2.18/lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `block in execute'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.11/lib/active_record/connection_adapters/abstract_adapter.rb:202:in `block in log'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activesupport-3.0.11/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.11/lib/active_record/connection_adapters/abstract_adapter.rb:200:in `log'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.2.18/lib/active_record/connection_adapters/mysql2_adapter.rb:265:in `execute'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/mysql2-0.2.18/lib/active_record/connection_adapters/mysql2_adapter.rb:586:in `select'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.11/lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.11/lib/active_record/connection_adapters/abstract/query_cache.rb:56:in `select_all'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.11/lib/active_record/base.rb:473:in `find_by_sql'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.11/lib/active_record/relation.rb:64:in `to_a'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/activerecord-3.0.11/lib/active_record/relation/finder_methods.rb:143:in `all'
from (irb):2
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.11/lib/rails/commands/console.rb:44:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.11/lib/rails/commands/console.rb:8:in `start'
from /usr/local/rvm/gems/ruby-1.9.2-p290/gems/railties-3.0.11/lib/rails/commands.rb:23:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
Worked fine before, so what could possibly be the problem?
When I have issues like these, what I usually do is make a new project using the newer rails gem. This way, I can look at the Gemfile that is produced and compare it to the old one that I have and then proceed to update it accordingly.
Also, be sure to run bundle install after changing anything in your Gemfile.
If you forget, it can usually be the reason you are having the problem.
I hope that helps you fix your issue.

Error - uninitialized constant Devise::IndifferentHash (NameError)

working in rails, and am trying the command 'rails g spree:site' as described in section 4.5 of the Spree getting Started Guide. not sure what the problem is, I am running rails 3.1.1.rc2 on a windows 7 platform. The error is below.
C:/Ruby192/lib/ruby/gems/1.9.1/gems/spree_auth-0.40.0/lib/spree_auth.rb:17:in `a
ctivate': uninitialized constant Devise::IndifferentHash (NameError)
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1.rc2/lib/act
ive_support/callbacks.rb:413:in `_run_prepare_callbacks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.1.1.rc2/lib/act
ive_support/callbacks.rb:81:in `run_callbacks'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/actionpack-3.1.1.rc2/lib/action
_dispatch/middleware/reloader.rb:46:in `prepare!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ap
plication/finisher.rb:41:in `block in <module:Finisher>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:29:in `instance_exec'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:29:in `run'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:54:in `block in run_initializers'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:53:in `each'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/in
itializable.rb:53:in `run_initializers'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ap
plication.rb:96:in `initialize!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ra
iltie/configurable.rb:30:in `method_missing'
from C:/Users/Edu/RubymineProjects/myStore/config/environment.rb:5:in `<
top (required)>'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/ap
plication.rb:83:in `require_environment!'
from C:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.1.1.rc2/lib/rails/co
mmands.rb:22:in `<top (required)>'
from script/rails:6:in `require'
from script/rails:6:in `<main>'
I had the same problem with rails 3.1. The solution was to put the following lines in my GEMFILE:
# ===:git with the repository's url that works=== #
gem 'spree', :git => 'git://github.com/spree/spree.git'
This should help in your case, too.
#jhsilva007 : Specifying this line ( gem 'spree', :git => 'git://github.com/spree/spree.git' )
definitely helped me resolving of error.
I think this line will get the latest version of the spree from github. What if I just want the particular version number of spree. I mean I don't like to get the beta version.

Installing cookbook on RubyMine

I am trying to import a folder(open directory) on Ruby Mine but when I do it says "Install missing gems" Everytime I click on it, it installs some and then again gives the same error.
I have Mac OS X 10.7.
Here is the error:
/Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/bin/bundle install
Fetching source index for http://rubygems.org/
Using rake (0.9.2)
Using multi_json (1.0.3)
Using activesupport (3.1.0)
Using bcrypt-ruby (3.0.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.0)
Using erubis (2.7.0)
Using rack (1.3.2)
Using rack-cache (1.0.3)
Using rack-mount (0.8.3)
Using rack-test (0.6.1)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.0.0)
Using actionpack (3.1.0)
Using mime-types (1.16)
Using polyglot (0.3.2)
Using treetop (1.4.10)
Using mail (2.3.0)
Using actionmailer (3.1.0)
Using arel (2.2.1)
Using tzinfo (0.3.29)
Using activerecord (3.1.0)
Using activeresource (3.1.0)
Using ansi (1.3.0)
Using bundler (1.0.18)
Installing nokogiri (1.5.0) with native extensions /Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/installer.rb:551:in `build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError)
/Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby extconf.rb
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... no
checking for iconv_open() in -liconv... no
-----
libiconv is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby
--with-zlib-dir
--without-zlib-dir
--with-zlib-include
--without-zlib-include=${zlib-dir}/include
--with-zlib-lib
--without-zlib-lib=${zlib-dir}/lib
--with-iconv-dir
--with-iconv-include
--without-iconv-include=${iconv-dir}/include
--with-iconv-lib
--without-iconv-lib=${iconv-dir}/lib
--with-xml2-dir
--without-xml2-dir
--with-xml2-include
--without-xml2-include=${xml2-dir}/include
--with-xml2-lib
--without-xml2-lib=${xml2-dir}/lib
--with-xslt-dir
--without-xslt-dir
--with-xslt-include
--without-xslt-include=${xslt-dir}/include
--with-xslt-lib
--without-xslt-lib=${xslt-dir}/lib
--with-iconvlib
--without-iconvlib
Gem files will remain installed in /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/nokogiri-1.5.0 for inspection.
Results logged to /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/nokogiri-1.5.0/ext/nokogiri/gem_make.out
from /Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/installer.rb:504:in `each'
from /Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/installer.rb:504:in `build_extensions'
from /Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/lib/ruby/site_ruby/1.8/rubygems/installer.rb:180:in `install'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/source.rb:101:in `install'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:78:in `preserve_paths'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/source.rb:91:in `install'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/installer.rb:58:in `run'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/rubygems_integration.rb:93:in `with_build_args'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/installer.rb:57:in `run'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/installer.rb:49:in `run'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/installer.rb:8:in `install'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/cli.rb:220:in `install'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `send'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/vendor/thor/task.rb:22:in `run'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/vendor/thor.rb:263:in `dispatch'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/lib/bundler/vendor/thor/base.rb:386:in `start'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/bundler-1.0.18/bin/bundle:13
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/bin/bundle:19:in `load'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/bin/bundle:19
from -e:1:in `load'
from -e:1
Process finished with exit code 1
Any thoughts on why so?
After installing novigiri, I am getting the following error:
/Users/Vinisa/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) /Assorted Mix/OOLS'11/OOLS-Lect/barik-csc517_cookbook3-325ff9f/script/rails server -b 0.0.0.0 -p 3000 -e development
=> Booting WEBrick
=> Rails 3.1.0 application starting in development on http://0.0.0.0:3000
=> Call with -d to detach
=> Ctrl-C to shutdown server
/Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load': /Assorted Mix/OOLS'11/OOLS-Lect/barik-csc517_cookbook3-325ff9f/config/initializers/session_store.rb:3: syntax error, unexpected ':', expecting $end (SyntaxError)
...sion_store :cookie_store, key: '_cookbook3_session'
^
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:640:in `new_constants_in'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:223:in `load_dependency'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/activesupport-3.1.0/lib/active_support/dependencies.rb:234:in `load'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/engine.rb:555
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/engine.rb:554:in `each'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/engine.rb:554
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `instance_exec'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/initializable.rb:25:in `run'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/initializable.rb:50:in `run_initializers'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `each'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/initializable.rb:49:in `run_initializers'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/application.rb:92:in `initialize!'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `send'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/railties-3.1.0/lib/rails/railtie/configurable.rb:30:in `method_missing'
from /Assorted Mix/OOLS'11/OOLS-Lect/barik-csc517_cookbook3-325ff9f/config/environment.rb:5
from /Assorted Mix/OOLS'11/OOLS-Lect/barik-csc517_cookbook3-325ff9f/config.ru:4:in `require'
from /Assorted Mix/OOLS'11/OOLS-Lect/barik-csc517_cookbook3-325ff9f/config.ru:4
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/rack-1.3.2/lib/rack/builder.rb:51:in `instance_eval'
from /Users/Vinisa/.rvm/gems/ree-1.8.7-2011.03/gems/rack-1.3.2/lib/rack/builder.rb:51:in `initialize'
from /Assorted Mix/OOLS'11/OOLS-Lect/barik-csc517_cookbook3-325ff9f/config.ru:1:in `new'
from /Assorted Mix/OOLS'11/OOLS-Lect/barik-csc517_cookbook3-325ff9f/config.ru:1
Exiting
Process finished with exit code 1
Thanks!
Installation of the Nokogiri gem is failing.
Try installing it manually for Mac OS # Why does installing Nokogiri on Mac OS fail with libiconv is missing?
Can you start the project by command line? It could be related with your ruby version.
Check this file and see if yours have the same syntax.