Rails 2.3.2 and config.action_controller.session

141 views
Skip to first unread message

RVic

unread,
Oct 28, 2013, 3:45:00 PM10/28/13
to rubyonra...@googlegroups.com
Further on migrating my ancient 1.8.6 Rails 2.3.2 app from Windows to Linux Mint, whatever I do, I keep getting the same error pertaining to " A key is required to write a cookie containing the session data. Use config.action_controller.session = { :key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb." This is true if I run run ruby script/server, or rake rails:update. However, in my config/environent.rb, I already have this statement the error is telling me I needed (in fact, it was commented out, but uncommenting it changes nothing for me, I keep getting the same error whenever I go to run something here). Anyone have an idea where else I can look here? Thaks, RVic


 ruby script/server
/home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:163:in `ensure_session_key': A key is required to write a cookie containing the session data. Use config.action_controller.session = { :key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb (ArgumentError)
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:74:in `initialize'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in `new'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:72:in `build'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `build'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/activesupport-2.3.2/lib/active_support/inflector.rb:361:in `inject'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `each'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `inject'
    from /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/middleware_stack.rb:116:in `build'
     ... 8 levels...
    from ./script/../config/boot.rb:11:in `boot!'
    from ./script/../config/boot.rb:110
    from script/server:2:in `require'
    from script/server:2

Hassan Schroeder

unread,
Oct 28, 2013, 4:09:51 PM10/28/13
to rubyonrails-talk
On Mon, Oct 28, 2013 at 12:45 PM, RVic <rvin...@hotmail.com> wrote:
> Further on migrating my ancient 1.8.6 Rails 2.3.2 app from Windows to Linux
> Mint

Are you sure your time wouldn't be better spent just moving straight
to current versions of Ruby and Rails? :-)

It might actually be easier than what you're doing now, and at the end
you'd have something besides a running but obsolete application with
known security vulnerabilities...

Just a suggestion!

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

Ralph Vince

unread,
Oct 28, 2013, 4:36:11 PM10/28/13
to rubyonra...@googlegroups.com
On Mon, Oct 28, 2013 at 4:09 PM, Hassan Schroeder <hassan.s...@gmail.com> wrote:

Are you sure your time wouldn't be better spent just moving straight
to current versions of Ruby and Rails?  :-)

It might actually be easier than what you're doing now, and at the end
you'd have something besides a running but obsolete application with
known security vulnerabilities...

Just a suggestion!


Hassan,

Oh I certainly will be migrating it -- I;ve just got the order though to get this thing up and running in a linux vm asap. Hopefully, Im not far from that. But there;s a lot that  Iwill have to migrate to the new mechanisms (routes are different, invoking the server is different, etc.) Thank you!

Colin Law

unread,
Oct 28, 2013, 5:12:30 PM10/28/13
to rubyonra...@googlegroups.com
On 28 October 2013 19:45, RVic <rvin...@hotmail.com> wrote:
> Further on migrating my ancient 1.8.6 Rails 2.3.2 app from Windows to Linux
> Mint, whatever I do, I keep getting the same error pertaining to " A key is
> required to write a cookie containing the session data. Use
> config.action_controller.session = { :key => "_myapp_session", :secret =>
> "some secret phrase" } in config/environment.rb." This is true if I run run
> ruby script/server, or rake rails:update. However, in my
> config/environent.rb,

Can you paste your environment.rb here please?

Colin

Ralph Vince

unread,
Oct 28, 2013, 5:19:32 PM10/28/13
to rubyonra...@googlegroups.com
On Mon, Oct 28, 2013 at 5:12 PM, Colin Law <cla...@googlemail.com> wrote:

Can you paste your environment.rb here please?

Colin


Thanks Colin!

# Be sure to restart your web server when you modify this file.

# Uncomment below to force Rails into production mode when
# you don't control web/app server and can't set it the proper way
# ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
# RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
require 'paginator'

Rails::Initializer.run do |config|

  # Settings in config/environments/* take precedence those specified here
 
  # Skip frameworks you're not going to use
  #config.frameworks -= [ :action_web_service, :action_mailer ]

  # Add additional load paths for your own custom dirs
  # config.load_paths += %W( #{RAILS_ROOT}/extras )
  config.load_paths += %W( #{RAILS_ROOT}/app/reports )

  # Required for Ruports: ############
   config.after_initialize do
      require "ruport"
    end    
  # **SEE CONFIG_LOAD_PATHS ABOVE  and require "app/reports/templates" BELOW**
  ###########################
 
  # Force all environments to use the same logger level
  # (by default production uses :info, the others :debug)
  # config.log_level = :debug

  # Use the database for sessions instead of the file system
  # which shouldn't be used to store highly confidential information
  # (create the session table with 'rake db:sessions:create')
  config.action_controller.session_store = :active_record_store
 
  # Use SQL instead of Active Record's schema dumper when creating the test database.
  # This is necessary if your schema can't be completely dumped by the schema dumper,
  # like if you have constraints or database-specific column types
  # config.active_record.schema_format = :sql

  # Activate observers that should always be running
  # config.active_record.observers = :cacher, :garbage_collector

  # Make Time.zone default to the specified zone, and make Active Record store time values
     # in the database in UTC, and return them converted to the specified local zone.
     # Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
  config.active_record.default_timezone = :utc
 
 
  # See Rails::Configuration for more options
 
  # Your secret key for verifying cookie session data integrity.
   # If you change this key, all old sessions will become invalid!
   # Make sure the secret is at least 30 characters and all random,
   # no regular words or you'll be exposed to dictionary attacks.
 config.action_controller.session = {
    :key => "_gg_session",
   :secret => "caf079519f0a811fa0ba9a0a3202c93f62d9f86ca4f1981harverdouccioe55e3869ee4aa8cbb48aecb518f1059103b7eb49b513f4d6ddc40d92e9488785eb90689229ad"
  }
 
  config.gem "authlogic"
  config.gem "actionmailer"
  config.gem "calendar_date_select"
  config.gem "paginator"
  config.gem "builder"
end

require "app/reports/templates"

# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
#   inflect.plural /^(ox)$/i, '\1en'
#   inflect.singular /^(ox)en/i, '\1'
#   inflect.irregular 'person', 'people'
#   inflect.uncountable %w( fish sheep )
# end


  
# Include your application configuration below

Colin Law

unread,
Oct 28, 2013, 5:32:55 PM10/28/13
to rubyonra...@googlegroups.com
On 28 October 2013 21:19, Ralph Vince <rvin...@gmail.com> wrote:
>
>
>
> On Mon, Oct 28, 2013 at 5:12 PM, Colin Law <cla...@googlemail.com> wrote:
>>
>>
>> Can you paste your environment.rb here please?
>>
>> Colin
>
>
> Thanks Colin!
>
> # Be sure to restart your web server when you modify this file.
>
> # Uncomment below to force Rails into production mode when
> # you don't control web/app server and can't set it the proper way
> # ENV['RAILS_ENV'] ||= 'production'
>
> # Specifies gem version of Rails to use when vendor/rails is not present
> # RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION

The above line should not be commented out, but should of course
reference '2.3.2'. I don't know whether that might have anything to
do with it or not.

>
> # Bootstrap the Rails environment, frameworks, and default configuration
> require File.join(File.dirname(__FILE__), 'boot')
> require 'paginator'

The line above should not be there, again I don't know whether it is
relevant to the problem.

>
> Rails::Initializer.run do |config|
>
> # Settings in config/environments/* take precedence those specified here
>
> # Skip frameworks you're not going to use
> #config.frameworks -= [ :action_web_service, :action_mailer ]
>
> # Add additional load paths for your own custom dirs
> # config.load_paths += %W( #{RAILS_ROOT}/extras )
> config.load_paths += %W( #{RAILS_ROOT}/app/reports )
>
> # Required for Ruports: ############
> config.after_initialize do
> require "ruport"
> end
> # **SEE CONFIG_LOAD_PATHS ABOVE and require "app/reports/templates"
> BELOW**
> ###########################
>
> # Force all environments to use the same logger level
> # (by default production uses :info, the others :debug)
> # config.log_level = :debug
>
> # Use the database for sessions instead of the file system
> # which shouldn't be used to store highly confidential information
> # (create the session table with 'rake db:sessions:create')

Have you done the above? Either do that and/or comment out the line
below, at least until it is working.

> config.action_controller.session_store = :active_record_store
>
> # Use SQL instead of Active Record's schema dumper when creating the test
> database.
> # This is necessary if your schema can't be completely dumped by the
> schema dumper,
> # like if you have constraints or database-specific column types
> # config.active_record.schema_format = :sql
>
> # Activate observers that should always be running
> # config.active_record.observers = :cacher, :garbage_collector
>
> # Make Time.zone default to the specified zone, and make Active Record
> store time values
> # in the database in UTC, and return them converted to the specified
> local zone.
> # Run "rake -D time" for a list of tasks for finding time zone names.
> Comment line to use default local time.
> config.active_record.default_timezone = :utc
>
>
> # See Rails::Configuration for more options
>
> # Your secret key for verifying cookie session data integrity.
> # If you change this key, all old sessions will become invalid!
> # Make sure the secret is at least 30 characters and all random,
> # no regular words or you'll be exposed to dictionary attacks.
> config.action_controller.session = {
> :key => "_gg_session",

That should be :session_key I think, at least that is what I have, in
which case the error message is wrong.

> :secret =>
> "caf079519f0a811fa0ba9a0a3202c93f62d9f86ca4f1981harverdouccioe55e3869ee4aa8cbb48aecb518f1059103b7eb49b513f4d6ddc40d92e9488785eb90689229ad"
> }
>
> config.gem "authlogic"
> config.gem "actionmailer"
> config.gem "calendar_date_select"
> config.gem "paginator"
> config.gem "builder"
> end
>
> require "app/reports/templates"
>
> # Add new inflection rules using the following format
> # (all these examples are active by default):
> # Inflector.inflections do |inflect|
> # inflect.plural /^(ox)$/i, '\1en'
> # inflect.singular /^(ox)en/i, '\1'
> # inflect.irregular 'person', 'people'
> # inflect.uncountable %w( fish sheep )
> # end
>
>
>
> # Include your application configuration below
>

Colin

Ralph Vince

unread,
Oct 28, 2013, 5:46:35 PM10/28/13
to rubyonra...@googlegroups.com
Colin

-

Colin, I made the changes you said to make here (I did, well before, do rake db:sessions:create and have the table resident in the db). I;ve lso tried using :session_key in instead of :key.....noe of which seems to be affecting it:

Ralph Vince

unread,
Oct 28, 2013, 5:51:18 PM10/28/13
to rubyonra...@googlegroups.com
I think the issue may be something else Colin. For example, this error seems to crop up no matte what the command is:

user@Mint15-32 ~/ggrip/ggripv2 $ rake rails:update
rake aborted!

A key is required to write a cookie containing the session data. Use config.action_controller.session = { :key => "_myapp_session", :secret => "some secret phrase" } in config/environment.rb
/home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:163:in `ensure_session_key'

Colin Law

unread,
Oct 28, 2013, 5:58:25 PM10/28/13
to rubyonra...@googlegroups.com
On 28 October 2013 21:46, Ralph Vince <rvin...@gmail.com> wrote:
>
> Colin, I made the changes you said to make here (I did, well before, do rake
> db:sessions:create and have the table resident in the db). I;ve lso tried
> using :session_key in instead of :key.....noe of which seems to be affecting
> it:
>
>
> ruby script/server
> /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:163:in
> `ensure_session_key': A key is required to write a cookie containing the
> session data. Use config.action_controller.session = { :key =>
> "_myapp_session", :secret => "some secret phrase" } in config/environment.rb
> (ArgumentError)
> from
> /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:74:in
> `initialize'

It is very odd, firstly it should not be using the cookie store, and
if it were then you have provided the session key. I have tried it
and it works for me with either :key or :session_key, and if I enable
the active_record_store then it does not ask in the first place.

Can you post development.rb please.

Colin

Colin Law

unread,
Oct 28, 2013, 5:59:51 PM10/28/13
to rubyonra...@googlegroups.com
On 28 October 2013 21:51, Ralph Vince <rvin...@gmail.com> wrote:
> I think the issue may be something else Colin. For example, this error seems
> to crop up no matte what the command is:
>
> user@Mint15-32 ~/ggrip/ggripv2 $ rake rails:update
> rake aborted!
>
> A key is required to write a cookie containing the session data. Use
> config.action_controller.session = { :key => "_myapp_session", :secret =>
> "some secret phrase" } in config/environment.rb
> /home/user/.rvm/gems/ruby-1.8.6-p420/gems/actionpack-2.3.2/lib/action_controller/session/cookie_store.rb:163:in
> `ensure_session_key'

That is not all that surprising, it has to load the environment in
order to run rake.

Colin

Ralph Vince

unread,
Oct 28, 2013, 6:04:33 PM10/28/13
to rubyonra...@googlegroups.com
On Mon, Oct 28, 2013 at 5:58 PM, Colin Law <cla...@googlemail.com> wrote:


It is very odd, firstly it should not be using the cookie store, and
if it were then you have provided the session key.  I have tried it
and it works for me with either :key or :session_key, and if I enable
the active_record_store then it does not ask in the first place.

Can you post development.rb please.

Colin

Thanks Colin, Development.rb:

# Settings specified here will take precedence over those in config/environment.rb
#require "ruby-debug"

# In the development environment your application's code is reloaded on
# every request.  This slows down response time but is perfect for development
# since you don't have to restart the webserver when you make code changes.
config.cache_classes = false

# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true

# Enable the breakpoint server that script/breakpointer connects to
#config.breakpoint_server = true

# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching             = false
#config.action_view.cache_template_extensions         = false
config.action_view.debug_rjs                         = true

# config/environments/development.rb
config.action_mailer.raise_delivery_errors = true

# set delivery method to :smtp, :sendmail or :test
config.action_mailer.delivery_method = :smtp

#set default type to html. Options are "text/plain", "text/html", and "text/enriched". The default value is "text/plain".
config.action_mailer.default_content_type = "text/html"

# these options are only needed if you choose smtp delivery
config.action_mailer.smtp_settings = {
  :address        => 'outgoing.verizon.net',
  :port           => 25,
  :domain         => 'www.example.com',
  :authentication => :login,
  :user_name      => 'cfgsr',
  :password       => 'p6687sq5'
}


 

Ralph Vince

unread,
Oct 28, 2013, 6:10:21 PM10/28/13
to rubyonra...@googlegroups.com
Wait,

Stupid me.

The database login parameters have changed -- when I change that, it gets past that error (give me a new one, of coursem but that must be the problem). I fixed it in database.yml.

Colin Law

unread,
Oct 28, 2013, 6:10:15 PM10/28/13
to rubyonra...@googlegroups.com
That all looks ok. Sorry I am out of ideas. I can only suggest that
you try making a new app (I can't remember how to do that in rails 2,
you will have to look it up if you don't know), and see if that works.
Then if that works add stuff in from your app till it breaks.

Colin

Ralph Vince

unread,
Oct 28, 2013, 6:12:53 PM10/28/13
to rubyonra...@googlegroups.com
And...once I get that one fixed...I'm right back to the original error!

Ralph Vince

unread,
Oct 28, 2013, 6:18:28 PM10/28/13
to rubyonra...@googlegroups.com
Thanks Colin.

How would you enable active_record_store? Perhaps I should try that first?

Ralph Vince

unread,
Oct 28, 2013, 6:29:51 PM10/28/13
to rubyonra...@googlegroups.com
I think there's more wrong here than what the error message suggests. For example:

user@Mint15-32 ~/ggrip/ggripv2 $ gem install rails -v 2.3.2
Successfully installed rails-2.3.2
1 gem installed
Installing ri documentation for rails-2.3.2...
Installing RDoc documentation for rails-2.3.2...

user@Mint15-32 ~/ggrip/ggripv2 $ rails -v
The program 'rails' can be found in the following packages:
 * rails
 * ruby-railties-3.2
Try: sudo apt-get install <selected package>


When I did rails - v, shouldn;t it have just returned 2.3.2 ?

Walter Lee Davis

unread,
Oct 28, 2013, 6:33:39 PM10/28/13
to rubyonra...@googlegroups.com

On Oct 28, 2013, at 6:29 PM, Ralph Vince wrote:

> I think there's more wrong here than what the error message suggests. For example:
>
> user@Mint15-32 ~/ggrip/ggripv2 $ gem install rails -v 2.3.2
> Successfully installed rails-2.3.2
> 1 gem installed
> Installing ri documentation for rails-2.3.2...
> Installing RDoc documentation for rails-2.3.2...
>
> user@Mint15-32 ~/ggrip/ggripv2 $ rails -v
> The program 'rails' can be found in the following packages:
> * rails
> * ruby-railties-3.2
> Try: sudo apt-get install <selected package>
>
>
> When I did rails - v, shouldn;t it have just returned 2.3.2 ?

Yes. I'm late to the party here, but are you using rvm on this server? What does your PATH look like? If you aren't using rvm, then have you tried using sudo, as in

sudo gem install rails -v 2.3.2

Without rvm, you may be installing these binaries somewhere that your PATH can't find them.

Walter

>
>
> On Mon, Oct 28, 2013 at 6:18 PM, Ralph Vince <rvin...@gmail.com> wrote:
> Thanks Colin.
>
> How would you enable active_record_store? Perhaps I should try that first?
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAAHNhKVuSHYWDXt0yRqF%3Dv-ErfaQ3XAhycqm1RJ_xK16QAVWZA%40mail.gmail.com.
> For more options, visit https://groups.google.com/groups/opt_out.

R Vince

unread,
Oct 28, 2013, 6:42:27 PM10/28/13
to rubyonra...@googlegroups.com
On Mon, Oct 28, 2013 at 6:33 PM, Walter Lee Davis <wa...@wdstudio.com> wrote:

Yes. I'm late to the party here, but are you using rvm on this server? What does your PATH look like? If you aren't using rvm, then have you tried using sudo, as in

sudo gem install rails -v 2.3.2

Without rvm, you may be installing these binaries somewhere that your PATH can't find them.

Walter


Walter,

I AM using rvm. My path:

user@Mint15-32 ~/ggrip/ggripv2 $ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/.rvm/bin
 

Hassan Schroeder

unread,
Oct 28, 2013, 7:30:55 PM10/28/13
to rubyonrails-talk
On Mon, Oct 28, 2013 at 3:42 PM, R Vince <rvin...@gmail.com> wrote:

> I AM using rvm. My path:
>
> user@Mint15-32 ~/ggrip/ggripv2 $ echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/.rvm/bin

Uh, well. It looks like rvm is installed, but you're not actually using it.
If you were, your path would start with the rvm bin directories for the
ruby and gemset you'd selected. Which it obviously doesn't.

Easy test: what does `rvm current` report? If it's not what you want,
that's the first thing to fix.

R Vince

unread,
Oct 28, 2013, 7:49:31 PM10/28/13
to rubyonra...@googlegroups.com
On Mon, Oct 28, 2013 at 7:30 PM, Hassan Schroeder <hassan.s...@gmail.com> wrote:
On Mon, Oct 28, 2013 at 3:42 PM, R Vince <rvin...@gmail.com> wrote:

> I AM using rvm. My path:
>
> user@Mint15-32 ~/ggrip/ggripv2 $ echo $PATH
> /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/user/.rvm/bin

Uh, well. It looks like rvm is installed, but you're not actually using it.
If you were, your path would start with the rvm bin directories for the
ruby and gemset you'd selected. Which it obviously doesn't.

Easy test: what does `rvm current` report? If it's not what you want,
that's the first thing to fix.


Hassan,

user@Mint15-32 ~/ggrip/ggripv2 $ rvm current
ruby-1.8.6-p420
 
which is correct. The /home/user/.rvm/bin in the PATH is correct, yes? What else are you saying should be in the PATH? THanks.

Hassan Schroeder

unread,
Oct 28, 2013, 8:09:11 PM10/28/13
to rubyonrails-talk
On Mon, Oct 28, 2013 at 4:49 PM, R Vince <rvin...@gmail.com> wrote:

> user@Mint15-32 ~/ggrip/ggripv2 $ rvm current
> ruby-1.8.6-p420
>
> which is correct. The /home/user/.rvm/bin in the PATH is correct, yes? What
> else are you saying should be in the PATH? THanks.

When you install gems that include a command-line component, e.g.
rails, the executables need to live somewhere in your path. Here's an
example from one of my rvm gemsets:

/Users/hassan/.rvm/gems/ruby-2.0.0-p247@rails4/bin:/Users/hassan/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/hassan/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/hassan/.rvm/bin:
... etc. ....

You clearly don't have `rails` in your path, even though you installed
the gem. So you need to fix this before proceeding. Personally, I'd
create a gemset specifically for this app and add a .rvmrc to the dir
where it lives.

R Vince

unread,
Oct 28, 2013, 8:22:09 PM10/28/13
to rubyonra...@googlegroups.com
On Mon, Oct 28, 2013 at 8:09 PM, Hassan Schroeder <hassan.s...@gmail.com> wrote:

When you install gems that include a command-line component, e.g.
rails, the executables need to live somewhere in your path. Here's an
example from one of my rvm gemsets:

/Users/hassan/.rvm/gems/ruby-2.0.0-p247@rails4/bin:/Users/hassan/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/hassan/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/hassan/.rvm/bin:
... etc. ....

You clearly don't have `rails` in your path, even though you installed
the gem. So you need to fix this before proceeding. Personally, I'd
create a gemset specifically for this app and add a .rvmrc to the dir
where it lives.


Thanks Hassan. I'll go and learn how to create the gemset then. The alternative I am thinking at this point is, for the third time, recreate the linux VM, starting with a clean linux vm and begin installing everything anew without rvm, I wont be needing other versions of Ruby/Rails on this thing (Ill create new Linux VMs for that) and given that I only need one instance, I should perhaps look to do this without rvm or even a gemset.

R Vince

unread,
Oct 28, 2013, 10:42:57 PM10/28/13
to rubyonra...@googlegroups.com, hassan.s...@gmail.com
Hassan,

So, according to your instructions, do I need to only add the path to rails? Where would that be under .rvm? Thank you!


On Mon, Oct 28, 2013 at 8:09 PM, Hassan Schroeder <hassan.s...@gmail.com> wrote:


When you install gems that include a command-line component, e.g.
rails, the executables need to live somewhere in your path. Here's an
example from one of my rvm gemsets:

/Users/hassan/.rvm/gems/ruby-2.0.0-p247@rails4/bin:/Users/hassan/.rvm/gems/ruby-2.0.0-p247@global/bin:/Users/hassan/.rvm/rubies/ruby-2.0.0-p247/bin:/Users/hassan/.rvm/bin:
... etc. ....

You clearly don't have `rails` in your path, even though you installed
the gem. So you need to fix this before proceeding. Personally, I'd
create a gemset specifically for this app and add a .rvmrc to the dir
where it lives.

--
Hassan Schroeder ------------------------ hassan.s...@gmail.com
http://about.me/hassanschroeder
twitter: @hassan

--
You received this message because you are subscribed to a topic in the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rubyonrails-talk/__P7NpklLsM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rubyonrails-ta...@googlegroups.com.

To post to this group, send email to rubyonra...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages