Hello, In learning Ruby on rails I became hooked on using the Console (ruby script/console) to interact with models. I have been playing with RadRails over the past week and haven''t figured out how to get a console going (or if this feature is even available). Though documentation is minimal, RadRails is fairly intuitive and overall a nice way to write apps. I just can''t figure out how to access the console. Any suggestions? Thanks in advance! -- Posted via http://www.ruby-forum.com/.
>From the command prompt go to the root directory were you have createdthe project. (the place from where you can see the app directory) Type: ruby script/console You can start using it. If you want to reset the console because you have modified any of the models then Dispatcher.reset_application! will reset the console without having to exit richard downe wrote:> Hello, > > In learning Ruby on rails I became hooked on using the Console (ruby > script/console) to interact with models. I have been playing with > RadRails over the past week and haven''t figured out how to get a console > going (or if this feature is even available). Though documentation is > minimal, RadRails is fairly intuitive and overall a nice way to write > apps. I just can''t figure out how to access the console. > > Any suggestions? Thanks in advance!-- Posted via http://www.ruby-forum.com/.
You can also run external tools within Eclipse. Click Run -> External Tools -> External Tools Create a New tool Location: c:\ruby\bin\ruby.exe Working directory: ${project_loc} Arguments: script\console Hope this helps -- Posted via http://www.ruby-forum.com/.
Rath wrote:> You can also run external tools within Eclipse. > > Click Run -> External Tools -> External Tools > > Create a New tool > > Location: c:\ruby\bin\ruby.exe > Working directory: ${project_loc} > Arguments: script\console > > Hope this helpsDon''t forget to Name the tool and apply changes. -- Posted via http://www.ruby-forum.com/.
Rath wrote:> Rath wrote: >> You can also run external tools within Eclipse. >> >> Click Run -> External Tools -> External Tools >> >> Create a New tool >> >> Location: c:\ruby\bin\ruby.exe >> Working directory: ${project_loc} >> Arguments: script\console >> >> Hope this helps > > Don''t forget to Name the tool and apply changes.Thanks Rath. I''m familiar with running the console from a windows command prompt (for example) but I''m trying to access the same feature in Rad Rails. I took your suggestion about Eclipse and within RadRails, it seems as if you need to go to the Ruby ''perspective'' to see ''Run''. But, under ''Run'' ther is no option for External tools. I''ve tried entering ''script/console'' as an argument but I keep getting an error message - ''unable to load module''. The strange thing is if I run script/generate, I get the help screen for ''generators'', so at least script does work. It''s just the console side of things that isn''t working. Thanks again. -- Posted via http://www.ruby-forum.com/.
richard downe wrote:> Rath wrote: >> Rath wrote: >>> You can also run external tools within Eclipse. >>> >>> Click Run -> External Tools -> External Tools >>> >>> Create a New tool >>> >>> Location: c:\ruby\bin\ruby.exe >>> Working directory: ${project_loc} >>> Arguments: script\console >>> >>> Hope this helps >> >> Don''t forget to Name the tool and apply changes. > > Thanks Rath. I''m familiar with running the console from a windows > command prompt (for example) but I''m trying to access the same feature > in Rad Rails. I took your suggestion about Eclipse and within RadRails, > it seems as if you need to go to the Ruby ''perspective'' to see ''Run''. > But, under ''Run'' ther is no option for External tools. I''ve tried > entering ''script/console'' as an argument but I keep getting an error > message - ''unable to load module''. The strange thing is if I run > script/generate, I get the help screen for ''generators'', so at least > script does work. It''s just the console side of things that isn''t > working. > Thanks again.**Update** It did manage to work. I went back to the terminal window (in RadRails) and the environment loaded just fine. Thanks for your help! -- Posted via http://www.ruby-forum.com/.