|
View:
New views
10 Messages
—
Rating Filter:
Alert me
|
|
|
Invalid excape character syntaxI'm brand new to RoR and Netbeans. I've successfully gone through the demos and sample code. When I try to create a project from scratch I and try to do Run/Debug Rake Task -> db:create, I get the following error. Invalid escape character syntax: /C:\HelloWorld\Rakefile/ C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2058:in `standard_exception_handling': Invalid escape character syntax: /C:\HelloWorld\Rakefile/ (RegexpError) from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2058:in `find' from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2058:in `each' from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2058:in `find' from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:2058:in `standard_exception_handling' from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/lib/rake.rb:1974:in `run' from C:/ruby/lib/ruby/gems/1.8/gems/rake-0.8.4/bin/rake:31 from C:/ruby/bin/rake:19:in `load' from C:/ruby/bin/rake:19 I have changed the NetBeans IDE to use the latest ruby 1.8.6_26 release, but that didn't help. This has to be a --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Invalid excape character syntaxI am in the same boat as you, Adam. New in NetBeans and RoR. I am trying to create a new RoR and trying to connect to a MS SQL Server database. I tried to use my existing database connection (which uses JTDS driver). I don't know this will work or if that is the cause of the error
|
|
|
Invalid excape character syntaxI've tried several things including using the RoR distribution and am still stuck. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Invalid excape character syntaxCan you try whether you can successfully run Rake tasks from the command line? Assuming you're using the bundled JRuby, open a command prompt for the project directory and run some Rake task there, e.g.: C:\YourRailsProjectDir><netbeans install dir>\ruby2\jruby-1.1.4\bin\jruby -S rake db:create (Obviously you need to replace <netbeans install dir> with the actual path to your NB installation). Erno adamp wrote: > I've tried several things including using the RoR distribution and am still stuck. > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Invalid excape character syntaxI tried that and it failed. The error was: Code: C:\Documents and Settings\adamp\My Documents\NetBeansProjects\HelloWorld>"C:\Pro gram Files\NetBeans 6.5.1\ruby2\jruby-1.1.4\bin\jruby" -S rake db:create (in C:/Documents and Settings/adamp/My Documents/NetBeansProjects/HelloWorld) Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` and try again. I ran the update as suggested and got the following error: Code: C:\Documents and Settings\adamp\My Documents\NetBeansProjects\HelloWorld>"C:\Pro gram Files\NetBeans 6.5.1\ruby2\jruby-1.1.4\bin\gem" update --system '"jruby.bat"' is not recognized as an internal or external command, operable program or batch file. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Invalid excape character syntaxSo I guess you're using some other Ruby platform than the bundled JRuby for the app? Could you try running some rake task using the same interpreter that you have set for the app (you can check the path to the interpreter from Tools -> Ruby Platforms)? Erno adamp wrote: > I tried that and it failed. The error was: > > > > > Code: > > > C:\Documents and Settings\adamp\My Documents\NetBeansProjects\HelloWorld>"C:\Pro > > gram Files\NetBeans 6.5.1\ruby2\jruby-1.1.4\bin\jruby" -S rake db:create > > (in C:/Documents and Settings/adamp/My Documents/NetBeansProjects/HelloWorld) > > Rails requires RubyGems >= 1.3.1 (you have 1.2.0). Please `gem update --system` > > and try again. > > > > > > > > I ran the update as suggested and got the following error: > > > > > Code: > > > C:\Documents and Settings\adamp\My Documents\NetBeansProjects\HelloWorld>"C:\Pro > > gram Files\NetBeans 6.5.1\ruby2\jruby-1.1.4\bin\gem" update --system > > '"jruby.bat"' is not recognized as an internal or external command, > > operable program or batch file. > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Invalid excape character syntaxYou are correct that I have two ruby installs on my box they are: Code: Ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] installed at: C:\ruby\bin and: Code: JRuby 1.8.6 (2008-08-28 patchlevel 114) [java] C:\Program Files\NetBeans 6.5.1\ruby2\jruby-1.1.4\bin\jruby.bat Both my project specific Ruby envirnment and the overall Netbean env, as specified in Tools -> Ruby Platforms, point to the "JRuby 1.8.6 (2008-08-28 patchlevel 114) [java]" --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Invalid excape character syntaxOK; I see. I was asking since the original stack trace you posted indicated that you use MRI Ruby, not JRuby. Is the error exactly the same now that you're using JRuby, or is the error now the "Rails requires RubyGems 1.3.1" one? If the latter, probably the easiest is to download and install JRuby 1.2.0 (jruby.codehaus.org) which bundles RubyGems 1.3.1. Please see http://blogs.sun.com/divas/entry/fixing_the_rails_requires_rubygems for detailed instructions. Let us know if that helps, Thanks, Erno adamp wrote: > You are correct that I have two ruby installs on my box they are: > > > > > Code: > > > Ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32] > > installed at: C:\ruby\bin > > > > > > > > and: > > > > > Code: > > > JRuby 1.8.6 (2008-08-28 patchlevel 114) [java] > > C:\Program Files\NetBeans 6.5.1\ruby2\jruby-1.1.4\bin\jruby.bat > > > > > > > > Both my project specific Ruby envirnment and the overall Netbean env, as specified in Tools -> Ruby Platforms, point to the "JRuby 1.8.6 (2008-08-28 patchlevel 114) [java]" > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Invalid excape character syntaxOK, I got over the first issue. It was quite painful, but sort of glad I had the process. First I went through various update paths to get jruby up to date. These are posted here http://blogs.sun.com/divas/entry/fixing_the_rails_requires_rubygems. I also had to update the rails system with: Code: >jruby -S gem install -v=2.3.2 rails Not sure how rails itself is out of date after a fresh install but whatever. I then found out how to debug the entire Rake process: 1) Right Click <project name> -> Run/Debug Rake Task -> db:create 2) and check "Debug" Debugging through I found that the system could not find the "mysql" gem at all. Not only could I see it in the debugger, but in debug mode the actual error printed out so I did: Code: gem install mysql To get the mysql gem installed. I then reran rake db:create and that worked. Finally I did: 1) Right Click <project name> -> Migrate Database -> To Current Version And it worked. I'm now on to routes problems, but I believe those errors being generated between the keyboard and the chair in my development environment. So in a nut shell, you need to update your jruby install and install the mysql gem. Thanks for help/pointers. Adam --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
|
|
Re: Invalid excape character syntaxHi Adam,
Great to hear it's working for you now. And thanks for posting your notes, they will help others running into the same problem. Cheers, Erno adamp wrote: > OK, I got over the first issue. It was quite painful, but sort of glad I had the process. First I went through various update paths to get jruby up to date. These are posted here http://blogs.sun.com/divas/entry/fixing_the_rails_requires_rubygems. I also had to update the rails system with: > > > > > Code: > >> jruby -S gem install -v=2.3.2 rails >> > > > > > > Not sure how rails itself is out of date after a fresh install but whatever. I then found out how to debug the entire Rake process: > > > > 1) Right Click <project name> -> Run/Debug Rake Task -> db:create > > 2) and check "Debug" > > > > Debugging through I found that the system could not find the "mysql" gem at all. Not only could I see it in the debugger, but in debug mode the actual error printed out so I did: > > > > > Code: > gem install mysql > > > > > > To get the mysql gem installed. I then reran rake db:create and that worked. > > > > Finally I did: > > > > 1) Right Click <project name> -> Migrate Database -> To Current Version > > > > And it worked. > > > > I'm now on to routes problems, but I believe those errors being generated between the keyboard and the chair in my development environment. > > > > So in a nut shell, you need to update your jruby install and install the mysql gem. > > > > Thanks for help/pointers. > > Adam > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@... > For additional commands, e-mail: users-help@... > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@... For additional commands, e-mail: users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |