Hi I have couple of issues with my application. I have an app checked out from a repository on to my local machine. rake commands like rake db:create and rake db:migrate and gem list, gem install are working with the app but not any other commands like rails generate scaffold User username:string, rails server, rails console.... following is the error Usage: rails new APP_PATH [options] Options: -r, [--ruby=PATH] # Path to the Ruby binary of your choice # Default: C:/Ruby192/bin/ruby.exe -d, [--database=DATABASE] # Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite3/frontbase/ibm_db) # Default: sqlite3 -b, [--builder=BUILDER] # Path to an application builder (can be a filesystem path or URL) -m, [--template=TEMPLATE] # Path to an application template (can be a filesystem path or URL) [--dev] # Setup the application with Gemfile pointing to your Rails checkout [--edge] # Setup the application with Gemfile pointing to Rails repository [--skip-gemfile] # Don''t create a Gemfile -O, [--skip-active-record] # Skip Active Record files -T, [--skip-test-unit] # Skip Test::Unit files -J, [--skip-prototype] # Skip Prototype files -G, [--skip-git] # Skip Git ignores and keeps Runtime options: -f, [--force] # Overwrite files that already exist -p, [--pretend] # Run but do not make any changes -q, [--quiet] # Supress status output -s, [--skip] # Skip files that already exist Rails options: -v, [--version] # Show Rails version number and quit -h, [--help] # Show this help message and quit Description: The ''rails new'' command creates a new Rails application with a default directory structure and configuration at the path you specify. Example: rails new ~/Code/Ruby/weblog This generates a skeletal Rails installation in ~/Code/Ruby/weblog. See the README in the newly created application to get going. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2011-Jan-06 20:42 UTC
Re: rails console not working with my application
Sawan T. wrote in post #972924:> Hi I have couple of issues with my application. I have an app checked > out from a repository on to my local machine. rake commands like rake > db:create and rake db:migrate and gem list, gem install are working with > the app but not any other commands like rails generate scaffold User > username:string, rails server, rails console.... > > following is the error > > Usage: > rails new APP_PATH [options]Hmm. Is the app Rails 3 or Rails 2? If you don''t know, try going to the app root directory and typing script/about (at least, this works for Rails 2 apps). Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote in post #972926:> Sawan T. wrote in post #972924: >> Hi I have couple of issues with my application. I have an app checked >> out from a repository on to my local machine. rake commands like rake >> db:create and rake db:migrate and gem list, gem install are working with >> the app but not any other commands like rails generate scaffold User >> username:string, rails server, rails console.... >> >> following is the error >> >> Usage: >> rails new APP_PATH [options] > > Hmm. Is the app Rails 3 or Rails 2? If you don''t know, try going to > the app root directory and typing script/about (at least, this works for > Rails 2 apps). > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org"Hi Marnen thanks for the reply. I know the application version is 2.3.5 and it is mentioned in my environment.rb file and even when I tried to do as you said"app root directory and typing script/about" it did not do anything but gave the same error message like previous. I forgot to tell you that I''m working on windows machine.. its weird because applications I have created on my local machine using rails new myapp works and all the other commands work with myapp.. I can create new controller new model or even add a column to the existing migration table etc..." -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 January 2011 20:55, Sawan T. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Marnen Laibow-Koser wrote in post #972926: >> Sawan T. wrote in post #972924: >>> Hi I have couple of issues with my application. I have an app checked >>> out from a repository on to my local machine. rake commands like rake >>> db:create and rake db:migrate and gem list, gem install are working with >>> the app but not any other commands like rails generate scaffold User >>> username:string, rails server, rails console.... >>> >>> following is the error >>> >>> Usage: >>> rails new APP_PATH [options] >> >> Hmm. Is the app Rails 3 or Rails 2? If you don''t know, try going to >> the app root directory and typing script/about (at least, this works for >> Rails 2 apps). >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > "Hi Marnen thanks for the reply. I know the application version is 2.3.5 > and it is mentioned in my environment.rb file and even when I tried to > do as you said"app root directory and typing script/about" it did not do > anything but gave the same error message like previous. I forgot to tell > you that I''m working on windows machine.. its weird because applications > I have created on my local machine using rails new myapp works and all > the other commands work with myapp.. I can create new controller new > model or even add a column to the existing migration table etc..."Have you installed rails 2.3.5? gem list should show you which versions you have installed. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2011-Jan-06 21:06 UTC
Re: rails console not working with my application
Sawan T. wrote in post #972932:> Marnen Laibow-Koser wrote in post #972926: >> Sawan T. wrote in post #972924: >>> Hi I have couple of issues with my application. I have an app checked >>> out from a repository on to my local machine. rake commands like rake >>> db:create and rake db:migrate and gem list, gem install are working with >>> the app but not any other commands like rails generate scaffold User >>> username:string, rails server, rails console.... >>> >>> following is the error >>> >>> Usage: >>> rails new APP_PATH [options] >> >> Hmm. Is the app Rails 3 or Rails 2? If you don''t know, try going to >> the app root directory and typing script/about (at least, this works for >> Rails 2 apps). >> >> Best, >> -- >> Marnen Laibow-Koser >> http://www.marnen.org >> marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > > "Hi Marnen thanks for the reply. I know the application version is 2.3.5 > and it is mentioned in my environment.rb fileThen there''s your problem. The syntax of the rails command changed between versions 2 and 3. The usage message you provided comes from version 3. So...you''ve got Rails 3''s command-line script, and a Rails 2 application. Do you have the Rails 2.3.5 gem available at all? (Check gem list rails and the vendor/rails directory in your app.)> and even when I tried to > do as you said"app root directory and typing script/about" it did not do > anything but gave the same error message like previous. I forgot to tell > you that I''m working on windows machine..That''s a problem right there. If you can work on a Mac or other *nix box, do. If not, download Virtual Rails. And I highly recommend using RVM (if you''re on *nix) to give this application its own gemset. (If you *must* work on Windows, I understand pik is similar.)> its weird because applications > I have created on my local machine using rails new myapp works and all > the other commands work with myapp.. I can create new controller new > model or even add a column to the existing migration table etc..."Right. Because those are Rails 3 apps. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser wrote in post #972937:> Sawan T. wrote in post #972932: >> Marnen Laibow-Koser wrote in post #972926: >>> Sawan T. wrote in post #972924: >>>> Hi I have couple of issues with my application. I have an app checked >>>> out from a repository on to my local machine. rake commands like rake >>>> db:create and rake db:migrate and gem list, gem install are working with >>>> the app but not any other commands like rails generate scaffold User >>>> username:string, rails server, rails console.... >>>> >>>> following is the error >>>>Then there''s your problem. The syntax of the rails command changed> between versions 2 and 3. The usage message you provided comes from > version 3. So...you''ve got Rails 3''s command-line script, and a Rails 2 > application. Do you have the Rails 2.3.5 gem available at all? (Check > gem list rails and the vendor/rails directory in your app.) > > That''s a problem right there. If you can work on a Mac or other *nix > box, do. If not, download Virtual Rails. > > And I highly recommend using RVM (if you''re on *nix) to give this > application its own gemset. (If you *must* work on Windows, I > understand pik is similar.) > >> its weird because applications >> I have created on my local machine using rails new myapp works and all >> the other commands work with myapp.. I can create new controller new >> model or even add a column to the existing migration table etc..." > > Right. Because those are Rails 3 apps. > > Best, > -- > Marnen Laibow-Koser > http://www.marnen.org > marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org"I have gem list rails showing me 3.0.3, 3.0.0 and 2.3.5 is it anything to do with your app_config.rb and I dont see any in vendor/rails its all have some plugin folders. I am working with tutorials which needed those rails version and 2.3.5 since my app needs it. I think the rails version will render to the needed Thanks Sawan." -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Lee Davis
2011-Jan-06 22:18 UTC
Re: Re: rails console not working with my application
On Jan 6, 2011, at 5:01 PM, Sawan T. wrote:> "I have gem list rails showing me 3.0.3, 3.0.0 and 2.3.5 is it > anything > to do with your app_config.rb and I dont see any in vendor/rails its > all > have some plugin folders. I am working with tutorials which needed > those > rails version and 2.3.5 since my app needs it. I think the rails > version > will render to the needed > > Thanks > Sawan."I believe you can always force a particular version of rails at the command line by using this syntax: rails_2.3.5 script/whatever But the smart money is on RVM. Walter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Marnen Laibow-Koser
2011-Jan-06 22:30 UTC
Re: Re: rails console not working with my application
Walter Davis wrote in post #972969:> On Jan 6, 2011, at 5:01 PM, Sawan T. wrote: > >> Thanks >> Sawan." > > > I believe you can always force a particular version of rails at the > command line by using this syntax: > > rails_2.3.5 script/whateverActually, that''s rails _2.3.5_ whatever other arguments. But that won''t make a difference here: Rails 2 doesn''t have all the script/* stuff subsumed under the rails command the way Rails 3 does.> > But the smart money is on RVM. > > WalterBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Walter Davis wrote in post #972969:> On Jan 6, 2011, at 5:01 PM, Sawan T. wrote: > >> Thanks >> Sawan." > > > I believe you can always force a particular version of rails at the > command line by using this syntax: > > rails_2.3.5 script/whatever > > But the smart money is on RVM. > > WalterThanks Walter for your reply, I used the syntax rails_2.3.5 script/console nothing happened. Then I tried to see the rails version by using rails -v and it gave me 3.0.3... is there anyway that I can have the app use verson 2.3.5 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 6 January 2011 22:33, Sawan T. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Walter Davis wrote in post #972969: >> On Jan 6, 2011, at 5:01 PM, Sawan T. wrote: >> >>> Thanks >>> Sawan." >> >> >> I believe you can always force a particular version of rails at the >> command line by using this syntax: >> >> rails_2.3.5 script/whatever >> >> But the smart money is on RVM. >> >> Walter > > Thanks Walter for your reply, I used the syntax rails_2.3.5 > script/console nothing happened. Then I tried to see the rails version > by using rails -v and it gave me 3.0.3... is there anyway that I can > have the app use verson 2.3.5I absolutely agree with another poster who said you should use rvm (Ruby Version Manager). This lets you separate out the sets of gems (including Rails) that an app should use so that it is not confused by other versions of gems on the system. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Colin Law wrote in post #973049:> On 6 January 2011 22:33, Sawan T. <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote: >>> rails_2.3.5 script/whatever >>> >>> But the smart money is on RVM. >>> >>> Walter >> >> Thanks Walter for your reply, I used the syntax rails_2.3.5 >> script/console nothing happened. Then I tried to see the rails version >> by using rails -v and it gave me 3.0.3... is there anyway that I can >> have the app use verson 2.3.5 > > I absolutely agree with another poster who said you should use rvm > (Ruby Version Manager). This lets you separate out the sets of gems > (including Rails) that an app should use so that it is not confused by > other versions of gems on the system. > > Colin"Hi Everyone.. I appreciate everyone for helping me out in this issue. I was googling and found that the rails version in the application is 2.3.5 will use the syntax "ruby script\console"... Walter was close to help me out on this but instead of rails script\whatever its ruby script\whatever... I had to deal with another issue as the script\console.rb file in the app script folder was not being found and this is because the file console.rb line 2 should be changed from require File.dirname(__FILE__) + ''/../config/boot'' to require File.expand_path(''../../config/boot'', __FILE__).. should be same with the server.rb too. In order to run or start the server on your local use ruby script\server webrick for webrick server or ruby script\server mongrel.... Thanks, Sawan " -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.