Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Pardot
Jul 25, 2001




A MIRACLE posted:

I'm ready to kill myself.

It seems like prom candy put you in the right direction, but for what it's worth github.com/heroku/heroku-buildpack-ruby/blob/master/lib/language_pack/rails3.rb#L37-66 shows is exactly what's happening in the slug compiler. That might help you debug locally and quicker.

Adbot
ADBOT LOVES YOU

Physical
Sep 26, 2007

by T. Finninho
How the heck do you get a debugger to work in a Win 7 64-bit environment using eclipse. All of these directions are so vague.

prom candy
Dec 16, 2005

Only I may dance

Physical posted:

How the heck do you get a debugger to work in a Win 7 64-bit environment using eclipse. All of these directions are so vague.

You're going to have a hard time finding help for that environment I think. When I develop Rails in windows (which is rare) I use Cygwin for the server. Neither Windows nor any of the IDEs are particularly well-supported, Cygwin takes away a lot of the pain IIRC.

Physical
Sep 26, 2007

by T. Finninho

prom candy posted:

You're going to have a hard time finding help for that environment I think. When I develop Rails in windows (which is rare) I use Cygwin for the server. Neither Windows nor any of the IDEs are particularly well-supported, Cygwin takes away a lot of the pain IIRC.

Eclipse and RadRails say that they have support and I keep getting errors that I am not sure what they mean.
code:
Fast Debugger (ruby-debug-ide 0.4.16, ruby-debug-base 0.11) listens on 127.0.0.1:51246
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:128:in `<module:Debugger>'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/interface.rb:1:in `<top (required)>'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:1:in `require_relative'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug/processor.rb:1:in `<top (required)>'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `require_relative'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug19-0.11.6/cli/ruby-debug.rb:6:in `<top (required)>'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `require'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:68:in `block (2 levels) in require'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `each'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:66:in `block in require'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `each'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler/runtime.rb:55:in `require'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.21/lib/bundler.rb:122:in `require'
	C:/Sites/CatalystSaaS/config/application.rb:7:in `<top (required)>'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:52:in `require'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:52:in `block in <top (required)>'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:49:in `tap'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/railties-3.1.3/lib/rails/commands.rb:49:in `<top (required)>'
	C:/Sites/CatalystSaaS/script/rails:6:in `require'
	C:/Sites/CatalystSaaS/script/rails:6:in `<top (required)>'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_load'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/lib/ruby-debug-ide.rb:112:in `debug_program'
	c:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/ruby-debug-ide-0.4.16/bin/rdebug-ide:87:in `<top (required)>'
	c:/RailsInstaller/Ruby1.9.2/bin/rdebug-ide:19:in `load'
	c:/RailsInstaller/Ruby1.9.2/bin/rdebug-ide:19:in `<main>'
Uncaught exception: superclass mismatch for class RemoteInterface
A gosh darn debugger would be so useful. If I switch over to running Ubuntu in a VM and run eclipse in there I would actually be able to get eclipse debugger to work?

prom candy
Dec 16, 2005

Only I may dance
I'm not totally sure. I don't know a lot of developers that run Eclipse. It seems like most Rails devs run development server via the command line (using Webrick or Mongrel or whatever) and then use their text editor of choice to write code (TextMate seems to be the most popular judging by screencasts, but Vim is up there too). By using these pre-packaged but somewhat poorly adopted solutions you may be setting yourself up to run into stumbling block after stumbling block, is there a reason you're determined to use Eclipse?

Edit: Also, #rubyonrails on freenode is a good place to ask for help, there are a lot more people there than there are reading this thread.

Physical
Sep 26, 2007

by T. Finninho

prom candy posted:

I'm not totally sure. I don't know a lot of developers that run Eclipse. It seems like most Rails devs run development server via the command line (using Webrick or Mongrel or whatever) and then use their text editor of choice to write code (TextMate seems to be the most popular judging by screencasts, but Vim is up there too). By using these pre-packaged but somewhat poorly adopted solutions you may be setting yourself up to run into stumbling block after stumbling block, is there a reason you're determined to use Eclipse?

Edit: Also, #rubyonrails on freenode is a good place to ask for help, there are a lot more people there than there are reading this thread.

Well it's no different than notepad++ if it doesn't have integrated debugging right? Eclipse is awesome and if you haven't ever used it then I can forgive you saying that it is a poorly adopted option. It's cross platform, written in Java. I use eclipse classic and there is a plugin for RoR that helps with the auto completes. I use the command line to run the WEBrick server. I think the problem is debugging support on windows in general, is that right?

A MIRACLE
Sep 17, 2007

All right. It's Saturday night; I have no date, a two-liter bottle of Shasta and my all-Rush mix-tape... Let's rock.

How the hell do they do autocomplete for a dynamically-typed language? Didn't know that was possible. Is it reliable?

Johnny Cache Hit
Oct 17, 2011

A MIRACLE posted:

How the hell do they do autocomplete for a dynamically-typed language? Didn't know that was possible. Is it reliable?

I've seen some Python IDEs try to do autocompletion. It's one of the most :psypop: things you'll ever run into. It alternated between "showing absolutely nothing" and "showing 400 possible methods that you'll never want to use".

Physical
Sep 26, 2007

by T. Finninho
It does it's best to guess. Usually local variables get remembered. It also does alot of formatting auto complete with html tags and brackets and stuff.

Johnny Cache Hit
Oct 17, 2011

Physical posted:

It does it's best to guess. Usually local variables get remembered. It also does alot of formatting auto complete with html tags and brackets and stuff.

There's a lot more to "autocomplete" than "oh, I typed po, and the editor knew I wanted to type the variable poop!" :v:

Usually when we talk about autocomplete the biggest focus is on, say, suggesting sensible methods that could be called on an object. I just don't see how something like that could ever work well with a dynamically typed language.

And lots of editors can do automatic formatting, auto-close HTML, etc.

But I'm just a bitter emacs weenie, so use whatever editor you like :shobon:

Physical
Sep 26, 2007

by T. Finninho

Kim Jong III posted:

There's a lot more to "autocomplete" than "oh, I typed po, and the editor knew I wanted to type the variable poop!" :v:

Usually when we talk about autocomplete the biggest focus is on, say, suggesting sensible methods that could be called on an object. I just don't see how something like that could ever work well with a dynamically typed language.

And lots of editors can do automatic formatting, auto-close HTML, etc.

But I'm just a bitter emacs weenie, so use whatever editor you like :shobon:
It would be nice if these editors basically ran an interpretor on the fly while you typed so they could get actual suggestions. That's why I want a working IDE debugger so badly, it lets me see where all the connections are going. I also said help with autocomplete, it does have ruby stuff in it and extends the basic eclipse built in stuff :v:

prom candy
Dec 16, 2005

Only I may dance
I can see the allure of wanting ruby autocomplete but honestly, there just aren't that many methods to memorize. It's not like PHP where there's no consistency in function naming or argument order. If you want a debugger I highly recommend just running your actual server via command line and dropping the debugger in your code where you need it. I know Eclipse is really popular, I just don't think it's very popular among Rails devs.

Physical
Sep 26, 2007

by T. Finninho
Whats the convetions on name tabes fields? say I have

code:
rails generate scafford HighScrol game_title:string
or
code:
rails generate scafford HighScrol gametitle:string
Which one should I be doing if I give a gently caress and want to adhere to all the standards I can.

Physical fucked around with this message at 22:06 on Feb 25, 2012

prom candy
Dec 16, 2005

Only I may dance
Use an underscore.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Physical posted:

Whats the convetions on name tabes fields? say I have

code:
rails generate scafford HighScrol game_title:string
or
code:
rails generate scafford HighScrol gametitle:string
Which one should I be doing if I give a gently caress and want to adhere to all the standards I can.

Have you tried normalizing the games into their own table that has a "name" field?

Physical
Sep 26, 2007

by T. Finninho
Here is an easy one. I'm running win 7 x64 and my project is using MySQL. When I do a say
code:
C:\myproject> rails generate model ATestModel firvar:string

      invoke  active_record
      create    db/migrate/_create_a_test_models.rb  <---------------
      create    app/models/a_test_model.rb
      invoke    rspec
      create      spec/models/a_test_model_spec.rb
      invoke      factory_girl
      create        spec/factories/a_test_models.rb

Emphasis mine. Notice that the migrate gets no date. And so when I run cmd>rake db:migrate it never updates the database with my new table.

Why is it not dating the migrate file?

This is part of my first project at work, and the simplest loving command is getting in the way. What config file would affect this?

So then when I do rake db:migrate the new table isn't recorded and this is what happens when I do with with --trace
code:
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Invoke db:load_config (first_time)
** Invoke rails_env (first_time)
** Execute rails_env
** Execute db:load_config
** Execute db:migrate
** Invoke db:schema:dump (first_time)
** Invoke environment
** Invoke db:load_config
** Execute db:schema:dump
Why won't it update my database?

Physical fucked around with this message at 01:50 on Feb 27, 2012

prom candy
Dec 16, 2005

Only I may dance
You mentioned earlier that you had access to a *nix box or VM? Honestly I would do my development there, Rails under Windows is painful. I have no idea why it wouldn't be dating your migrations, I've never seen that happen before.

Physical
Sep 26, 2007

by T. Finninho

prom candy posted:

You mentioned earlier that you had access to a *nix box or VM? Honestly I would do my development there, Rails under Windows is painful. I have no idea why it wouldn't be dating your migrations, I've never seen that happen before.
You know I came to the same realization after I had a problem with inherited resources not being imported with bundle install (for about 3 hrs) and while my boss was sitting at my desk I realized "maybe I should just switch to VM linux" so I brought it up to him right there and he said "yea maybe because this doesn't make sense to me either"

But its ok, because all the command line tools I'll run in linux, and use a shared folder. It does mean I have to do more configuration. its just the one project that it isnt being a migrate time in front of the file it produces.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
Did you accidentally change the migration after applying it? I've done that more times than I'd like to admit.

Physical
Sep 26, 2007

by T. Finninho

Cock Democracy posted:

Did you accidentally change the migration after applying it? I've done that more times than I'd like to admit.

I think the problem starts with why the migrate files are getting dates. instead of 20120226_create_table.rb its _create_table.rb

No other projects are doing this but the other projects are just demo tutorial exercises.

Cock Democracy
Jan 1, 2003

Now that is the finest piece of chilean sea bass I have ever smelled
drat. I guess that is pretty messed up.

Physical
Sep 26, 2007

by T. Finninho
this is just do drat frustrating. I just want to be able to use the tools I need. Why is this project braking that?

prom candy
Dec 16, 2005

Only I may dance
Same project under *nix, same problem?

Physical
Sep 26, 2007

by T. Finninho

prom candy posted:

Same project under *nix, same problem?

No I don't even know how to get the files over to the linux virtual machine. Adding shared folder in VirtualBox says guess additions isnt added and I don't knot enough about linux to figure this out.

enki42
Jun 11, 2001
#ATMLIVESMATTER

Put this Nazi-lover on ignore immediately!
There should be a menu option in VirtualBox for "Install Guest Additions". I think it's under devices.

Alternatively, just push it up to GitHub or something and clone the repo back down to your VirtualBox.

Physical
Sep 26, 2007

by T. Finninho

enki42 posted:

There should be a menu option in VirtualBox for "Install Guest Additions". I think it's under devices.

Alternatively, just push it up to GitHub or something and clone the repo back down to your VirtualBox.

When I click that, nothing opens. It sucks.

So I come in after trying to get this new part of the project scaffold and configured all weekend :bang: and talk to my boss about what happened, he says "Oh yea happens to me too [he is on a linux workstation] just put your own date/time string in front" :suicide:

This alarms me for two reasons: 1) Because I didn't get done with this thing over the weekend like I wanted to and since its only my third week. 2) Because I should have just emailed him and asked but now I look like a retard who wasted is weekend and and incompetent.

gently caress I hope I don't lose another job.

Physical fucked around with this message at 14:40 on Feb 27, 2012

prom candy
Dec 16, 2005

Only I may dance
I have never heard of this issue ever, is this a fresh project or something you cloned at your new job? Is this a work issued machine or your own?

Physical
Sep 26, 2007

by T. Finninho

prom candy posted:

I have never heard of this issue ever, is this a fresh project or something you cloned at your new job? Is this a work issued machine or your own?
New work issued laptop. Configured by my boss who is a pretty good IT guy. He knows more about rails than I do at this point. And as for the project, it is an in development project made by some over sea contractors that I downloaded via git.

prom candy
Dec 16, 2005

Only I may dance
Is this set anywhere:

code:
config.active_record.timestamped_migrations = false
If you fire up a new Rails app with the exact same gemset, database config, etc, do you get the timestamps?

Splinter
Jul 4, 2003
Cowabunga!
Mac users, what makes up your rails development environment?

Physical
Sep 26, 2007

by T. Finninho

prom candy posted:

Is this set anywhere:

code:
config.active_record.timestamped_migrations = false
If you fire up a new Rails app with the exact same gemset, database config, etc, do you get the timestamps?

That is not showing up anywhere in any of the project files. What file is it normally under? I want to put it in there with = true

Physical
Sep 26, 2007

by T. Finninho

Splinter posted:

Mac users, what makes up your rails development environment?

A linux VM maybe haha? But seriously, Eclipse is a cross platform IDE written in Java and I really like it because it does my AS3 (Flash [Flash Builder is the adobe brand name]) compiling for games, Java, Android, PHP and HTML and now RoR.

I'm a Win 7 guy though so ymmv.

Cocoa Crispies
Jul 20, 2001

Vehicular Manslaughter!

Pillbug

Splinter posted:

Mac users, what makes up your rails development environment?

http://pow.cx/ app server
https://github.com/sstephenson/rbenv ruby runtime management
https://github.com/spawngrid/kerl erlang runtime management
http://downloads.basho.com/riak/ built from source
http://mxcl.github.com/homebrew/ other packages
http://aquamacs.org/ editor
http://www.secretgeometry.com/apps/cathode/ terminal
http://gitx.laullon.com/ version control when i want to commit a partial file

hmm yes
Dec 2, 2000
College Slice
And some alternatives

"rails server" app server
http://beginrescueend.com ruby runtime management
http://www.sublimetext.com/2 text editor
http://www.iterm2.com terminal
http://www.sourcetreeapp.com version control

Sharrow
Aug 20, 2007

So... mediocre.
Kinda related, but pow + rack-legacy is a really neat combo if you need to run old PHP apps but also want to keep your environment consistent.

Pardot
Jul 25, 2001




Splinter posted:

Mac users, what makes up your rails development environment?

While I've only used sinatra in the last two years:

  • iterm2
  • vim
  • rbenv
  • ruby 1.9.3
  • bundle exec foreman start
  • postgres. Don't run sqlite locally if you're deploying to postgres (and don't use mysqlol)
  • git push heroku master

prom candy
Dec 16, 2005

Only I may dance

Physical posted:

That is not showing up anywhere in any of the project files. What file is it normally under? I want to put it in there with = true

application.rb

Open up rails console and type

YourApp::Application.config.active_record.timestamped_migrations

to see what it's set to. Replace YourApp with whatever your app's module is called in config/application.rb

quote:

Mac users, what makes up your rails development environment?

rails server
rvm
TextMate
github
mysqlol

A MIRACLE
Sep 17, 2007

All right. It's Saturday night; I have no date, a two-liter bottle of Shasta and my all-Rush mix-tape... Let's rock.

Splinter posted:

Mac users, what makes up your rails development environment?

* rvm, usually 1.9.3
* Rails 3.2
* Postgres
* Thin rails server thin
* Heroku
* Textmate
* git / Github
* Terminal

e: \/ pm sent! \/

A MIRACLE fucked around with this message at 23:30 on Feb 27, 2012

Pardot
Jul 25, 2001




redacted

Pardot fucked around with this message at 22:16 on Dec 8, 2013

Adbot
ADBOT LOVES YOU

Deus Rex
Mar 5, 2005

my general Mac rails/sinatra/jekyll toolbox is something like:

- rbenv (death to gemsets)
- pow
- Terminal.app / zsh
- git / github
- MacVim
- postgres
- virtualbox (for running development db instances sometimes)

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply