Search Results

Search found 11032 results on 442 pages for 'junior rails programmer'.

Page 1/442 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • rails gem permissions problem (tabs on rails)

    - by aguynamedloren
    I'm having trouble running a gem, tabs on rails -v=1.3.2, in my rails 2.3.8 app. The gem is installed locally (Ubuntu 10.10) and I have config.gem "tabs_on_rails", :version="1.3.2" in environment.rb. This is the output I get when I run script/server: loren@ubuntu:~/apps/medmentum$ script/server => Booting WEBrick => Rails 2.3.8 application starting on http://0.0.0.0:3000 no such file to load -- tabs_on_rails /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:36:in `require' /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/gem_dependency.rb:215:in `load' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in `load_gems' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in `each' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:307:in `load_gems' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:164:in `process' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send' /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run' /home/loren/apps/medmentum/config/environment.rb:11 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in' /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' /var/lib/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3 /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/plugin.rb:158:in `read': Permission denied - /var/lib/gems/1.8/gems/tabs_on_rails-1.3.2/rails/init.rb (Errno::EACCES) from /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/plugin.rb:158:in `evaluate_init_rb' from /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/plugin.rb:154:in `evaluate_init_rb' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/plugin.rb:48:in `load' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/plugin/loader.rb:38:in `load_plugins' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/plugin/loader.rb:37:in `each' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/rails/plugin/loader.rb:37:in `load_plugins' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:369:in `load_plugins' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:165:in `process' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `send' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/initializer.rb:113:in `run' from /home/loren/apps/medmentum/config/environment.rb:11 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' from /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:521:in `new_constants_in' from /var/lib/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:156:in `require' from /var/lib/gems/1.8/gems/rails-2.3.8/lib/commands/server.rb:84 from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' from script/server:3 When I run rake gems:install, I get this: Permission denied - /var/lib/gems/1.8/gems/tabs_on_rails-1.3.2/rails/init.rb I navigated to the tabs_on_rails gem folder in the filesystem and all of the files are locked. According to the files' properties, I am not the owner and cannot change the permissions. All of my other local gems are accessible without permissions problems, so this is odd. Any help is very much appreciated!

    Read the article

  • Ruby on Rails: url_for :back leads to NoMethodError for back_url

    - by Platinum Azure
    Hi all, I'm trying to use url_for(:back) to create a redirect leading back to a previous page upon a user's logging in. I've had it working successfully for when the user just goes to the login page on his or her own. However, when the user is redirected to the login page due to accessing a page requiring that the user be authenticated, the redirect sends the user back to the page before the one s/he had tried to access with insufficient permissions. I'm trying to modify my login controller action to deal with the redirect properly. My plan is to have a query string parameter "redirect" that is used when a forced redirect occurs. In the controller, if that parameter exists that URL is used; otherwise, url_for(:back) is used, or if that doesn't work (due to lack of HTTP_REFERER), then the user is redirected to the site's home page. Here is the code snippet which is supposed to implement this logic: if params[:redirect] @url = params[:redirect] else @url = url_for :back @url ||= url_for :controller => "home", :action => "index" end The error I get is: NoMethodError in UsersController#login undefined method `back_url' for # RAILS_ROOT: [obscured] Application Trace | Framework Trace | Full Trace vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `__send__' vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `polymorphic_url' vendor/rails/actionpack/lib/action_controller/base.rb:628:in `url_for' app/controllers/users_controller.rb:16:in `login' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `synchronize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `__send__' vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `polymorphic_url' vendor/rails/actionpack/lib/action_controller/base.rb:628:in `url_for' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `perform_action_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `perform_action_without_caching' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support' vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process' vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:184:in `handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/railties/lib/commands/servers/mongrel.rb:64 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/railties/lib/commands/server.rb:49 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3 vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `__send__' vendor/rails/actionpack/lib/action_controller/polymorphic_routes.rb:112:in `polymorphic_url' vendor/rails/actionpack/lib/action_controller/base.rb:628:in `url_for' app/controllers/users_controller.rb:16:in `login' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:1256:in `perform_action_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:617:in `call_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' /usr/lib/ruby/1.8/benchmark.rb:293:in `measure' vendor/rails/actionpack/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue' vendor/rails/actionpack/lib/action_controller/rescue.rb:136:in `perform_action_without_caching' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:13:in `perform_action' vendor/rails/activerecord/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache' vendor/rails/activerecord/lib/active_record/query_cache.rb:8:in `cache' vendor/rails/actionpack/lib/action_controller/caching/sql_cache.rb:12:in `perform_action' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `send' vendor/rails/actionpack/lib/action_controller/base.rb:524:in `process_without_filters' vendor/rails/actionpack/lib/action_controller/filters.rb:606:in `process_without_session_management_support' vendor/rails/actionpack/lib/action_controller/session_management.rb:134:in `process' vendor/rails/actionpack/lib/action_controller/base.rb:392:in `process' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:184:in `handle_request' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:112:in `dispatch_unlocked' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:125:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `synchronize' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:124:in `dispatch' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:134:in `dispatch_cgi' vendor/rails/actionpack/lib/action_controller/dispatcher.rb:41:in `dispatch' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:76:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `synchronize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/rails.rb:74:in `process' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:159:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:158:in `process_client' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:285:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `initialize' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `new' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel.rb:268:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:282:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `each' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/configurator.rb:281:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:128:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/lib/mongrel/command.rb:212:in `run' /var/lib/gems/1.8/gems/mongrel-1.1.5/bin/mongrel_rails:281 vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load_without_new_constant_marking' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:142:in `load' vendor/rails/railties/lib/commands/servers/mongrel.rb:64 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/activesupport/lib/active_support/dependencies.rb:521:in `new_constants_in' vendor/rails/activesupport/lib/active_support/dependencies.rb:153:in `require' vendor/rails/railties/lib/commands/server.rb:49 /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' script/server:3 Request Parameters: None Show session dump --- :user: :csrf_id: 2927cca61bbbe97218362b5bcdb74c0f flash: !map:ActionController::Flash::FlashHash {} Response Headers: {"Content-Type"="", "cookie"=[], "Cache-Control"="no-cache"} Bear in mind that I had it working earlier-- url_for(:back) knew how to operate properly before I added this logic. Thanks in advance for any ideas!

    Read the article

  • Programmer performance

    - by RSK
    I am a PHP programmer with 1 year of experience. As I am just starting my career, I am learning a lot of things now. I can say I am a little bit of a perfectionist. When I am assigned a problem I start off by Googling. Then, even when I find a solution, I keep trying for a better one until I find 2-3 options. Then I start learning it and choose the best performing solution. Even though I am learning a lot, this process gets me labeled as a low performer. My questions: As a novice, should I continue to use this learning process and not worry about my performance? Should I focus more on my performance and less on how the code performs?

    Read the article

  • How to hire a web-programmer : for non-programmer

    - by 0Complex
    I am a non-programmer that has used the services of : freelancer, odesk, etc I've tried asking for what i need but, I can't find anyone who can show me any type of example similar to what I request in the specs for the web-programming. They have front ends and back ends, but they don't fulfill true "live" website requirements. "live" as to be ready to support traffic, keys in hand, can be updated constantly by me, ... How do I figure how to evaluate a programmer ? How do I bid the appropriate price for the services ?

    Read the article

  • How to test Rails 3 Engines with Cucumber & Rspec?

    - by cowboycoded
    I apologize if this question is slightly subjective... I am trying to figure out the best way to test Rails 3 Engines with Cucumber & Rspec. In order to test the engine a rails 3 app is necessary. Here is what I am currently doing: Add a rails test app to the root of the gem (myengine) by running: rails new /myengine/rails_app Add Cucumber to /myengine/rails_app/features as you would in a normal Rails app Require the Rails Engine Gem (using :path=>"/myengine") in /myengine/rails_app/Gemfile Add spec to the root directory of the gem: /myengine/spec Include the fixtures in /myengine/spec/fixtures and I add the following to my cuc env.rb: env.rb: Fixtures.reset_cache fixtures_folder = File.join(Rails.root, 'spec', 'fixtures') fixtures = Dir[File.join(fixtures_folder, '*.yml')].map {|f| File.basename(f, '.yml') } Fixtures.create_fixtures(fixtures_folder, fixtures) Do you see any problems with setting it up like this? The tests run fine, but I am a bit hesitant to put the features inside the test rails app. I originally tried putting the features in the root of the gem and I created the test rails app inside features/support, but for some reason my engine would not initialize when I ran the tests, even though I could see the app loading everything else when cuc ran. If anyone is working with Rails Engines and is using cuc and rspec for testing, I would be interested to hear your setup.

    Read the article

  • How to force reload all vendor/plugins in rails 2.3 (development mode)

    - by tsdbrown
    We have an application with a app/model that references another model stored in a plugin. When the app/model level is reloaded on the second and further requests and that relies on our model in vendor/plugins/... (which stays loaded) it fails (can't dup nil class). We've tried setting config.reload_plugins = true in the development.rb but this doesn't seem to do it. Does anybody know a way to handle this?

    Read the article

  • Please recommend a good book on general IT for junior developer

    - by Rachel
    I have just got a job as a junior java developer and I am finding learning the code fine as I taught myself to pass the interview tests, trouble is I have a biology degree and know little about general IT and computer /network jargon. I don't want to be seen as a total idiot and non - techie so please can you recommend a book I can read / study to quickly increase my general background knowledge so that I can compete on a level with IT graduates!

    Read the article

  • Hiring a Junior Developer, What should I ask?

    - by Jeremy
    We are currently hiring a junior developer to help me out, as I have more projects than I can currently manage. I have never hired anyone who wasn't a friend or at least an acquaintance. I have a phone interview with the only applicant that actually stood out to me (on paper), but I have never done this before. Our projects are all high scalability, data intensive web applications that process millions of transactions an hour, across multiple servers and clients. To be language/stack specific, we use ASP.Net MVC2, WebForms and C# 4, MSSQL 2008 R2, all running atop Windows Server 2008 R2 What should I ask him? How should I structure the phone call?

    Read the article

  • Hiring a Junior Developer, What should I ask?

    - by Jeremy
    We are currently hiring a junior developer to help me out, as I have more projects than I can currently manage. I have never hired anyone who wasn't a friend or at least an acquaintance. I have a phone interview with the only applicant that actually stood out to me (on paper), but I have never done this before. Our projects are all high scalability, data intensive web applications that process millions of transactions an hour, across multiple servers and clients. To be language/stack specific, we use ASP.Net MVC2, WebForms and C# 4, MSSQL 2008 R2, all running atop Windows Server 2008 R2 What should I ask him? How should I structure the phone call?

    Read the article

  • Junior developer introduction to job industry

    - by lady_killer
    I am a junior developer at my second working experience, the first one using PHP with WordPress and currently on Groovy on Grails. I like coding, I attend meetup to discuss technology etc but I still did not understand how to become a real professional with the "know how" attitude. I read Clean Coder, the author advises to spend 20 hours per week of my spare time to learn new technologies and to keep myself up to date. I do not find this realistic, if you want to have a bit of a social life, and I also noticed that learning at work, at least in the places where I worked, is not ideal. No support from seniors for new projects, no pair programming and code reviews, no company trainings, one hour a week tech meetings where seniors walk away after a bit because they already know the topic discussed and so on. Sometimes is quite hard to keep the motivation... My questions are: Is our industry supposed to be like this? Is there real team working in the sense of sharing knowledge and help juniors to get up to speed? Are we supposed to learn new technologies or technology features just in our spare time?Clean Coder says football players do not train during official matches and our working hours are like official matches, we should just perform and learn in other moments. Is it really like this? How can I improve my skills with no support? Is it enough to read books and try out the exercises and perhaps some katas? In almost 5 month of Groovy on Grails experience at work, I have never had the opportunity to create anything from scratch, just worked on existing issues where it was even really difficult to get the domain knowledge from senior devs.

    Read the article

  • How does a programmer who doesn't know how to program get a job ? [closed]

    - by A programmer
    I often read about this and I'm curious: if there programmers who can't program, how did they get a programming job in the first place? They must bring some value to the company they're working for, otherwise they would be fired. I don't think "programmers who don't know how to program" means "bad programmers" in this case ? Even if they are bad programmers, they still know (badly) how to write (bad) programs. So what defines programmers who can't program ?

    Read the article

  • Why am I getting "ArgumentError: wrong number of arguments (1 for 0)" when running my rails function

    - by Hisham
    I'm stumped on what's causing this. I get this error and stack trace in all my functional tests where I call 'post'. Here is the full stack trace: 7) Error: test_should_validate(UsersControllerTest): ArgumentError: wrong number of arguments (1 for 0) /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route.rb:48:in `to_query' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route.rb:48:in `build_query_string' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route.rb:46:in `each' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route.rb:46:in `build_query_string' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route.rb:233:in `append_query_string' generated code (/Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route.rb:154):3:in `generate' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:365:in `__send__' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:365:in `generate' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:364:in `each' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/routing/route_set.rb:364:in `generate' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:208:in `rewrite_path' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:187:in `rewrite_url' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/url_rewriter.rb:165:in `rewrite' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/test_process.rb:450:in `build_request_uri' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/test_process.rb:406:in `process' /Users/hisham/src/rails/ftuBackend/vendor/rails/actionpack/lib/action_controller/test_process.rb:376:in `post' functional/users_controller_test.rb:57:in `test_should_validate' /Users/hisham/src/rails/ftuBackend/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:60:in `__send__' /Users/hisham/src/rails/ftuBackend/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:60:in `run' This is the test I'm running: def test_should_validate post :validate, :user => { :email => '[email protected]', :password => 'quire', :password_confirmation => 'quire', :agreed_to_terms => "true" } assert assigns(:user).errors.empty? assert_response :success end

    Read the article

  • Rails 2 support after Rails 3 has been released

    - by J. Pablo Fernández
    Is there some plan or estimate about how long will Rails 2 be supported after Rails 3 has been released? I wanted to ride the wave and move to Rails 3 right away, specially for projects that may take 4 or 6 months to finish (so that they would probably be released with Rails 3.0.0 final) but I've found many things still not working, many basic plugins and gems; so I believe I'm stuck with Rails 2 for now.

    Read the article

  • Working with a company as a Junior Developer [closed]

    - by user1601973
    We all have started our careers in some way or other. Well, I am a college student based in North America & I am doing my second internship with the same company with which I did my first internship. I came back here because people here were helpful always and supportive. But it just happened today, and I wanted to share this on SO. Well since I started I have been doing documentation and that kind of stuff only as compared to my first internship in which I actually worked along with the developers & learned so many things. Well, I was in a conversation with my Team lead, and he asked me if I completed that particular work or not? Well, That particular work had slipped from my mind. He was indeed I kind of pissed, and said "You don't have to worry about it, I will figure out". Well, I felt so bad and was about to literally cry. I stopped my lunch and then went on to complete that work. I always ask for work in office, and I always try to be an asset for whoever I am working but this was the first time that it happened. What are your thoughts on this and should I apologise or not? I think I should.

    Read the article

  • How to extend an 'unloadable' Rails plugin?

    - by Vitaly Kushner
    I'm trying to write a plugin that will extend InheritedResources. Specifically I want to rewrite some default helpers. And I'd like it to "just work" once installed, w/o any changes to application code. The functionality is provided in a module which needs to be included in a right place. The question is where? :) The first attempt was to do it in my plugin's init.rb: InheritedResources::Base.send :include, MyModule It works in production, but fails miserably in development since InheritedResource::Base declared as unloadable and so its code is reloaded on each request. So my module is there for the first request, and then its gone. InheritedResource::Base is 'pulled' in again by any controller that uses it: Class SomeController < InheritedResource::Base But no code is 'pulling in' my extension module since it is not referenced anywhere except init.rb which is not re-loaded on each request So right now I'm just including the module manually in every controller that needs it which sucks. I can't even include it once in ApplicationController because InheritedResources inherites from it and so it will override any changes back. update I'm not looking for advice on how to 'monkey patch'. The extension is working in production just great. my problem is how to catch moment exactly after InheritedResources loaded to stick my extension into it :) update2 another attempt at clarification: the sequence of events is a) rails loads plugins. my plugin loads after inherited_resources and patches it. b) a development mode request is served and works c) rails unloads all the 'unloadable' code which includes all application code and also inherited_resources d) another request comes in e) rails loads controller, which inherites from inherited resources f) rails loads inherited resources which inherit from application_controller g) rails loads application_contrller (or may be its already loaded at this stage, not sure) g) request fails as no-one loaded my plugin to patch inherited_resources. plugin init.rb files are not reloaded I need to catch the point in time between g and h

    Read the article

  • Writing tests for Rails plugins

    - by Adam
    I'm working on a plugin for Rails that would add limited in-memory caching to ActiveRecord's finders. The functionality itself is mature enough, but I can't for the life of me get unit tests to work with the plugin. I now have under vendor/plugins/my_plugin/test/my_plugin_test.rb a standard subclass of ActiveSupport::TestCase with a couple of basic tests. I try running 'rake test' from the plugin directory, and I have confirmed that this task loads the ruby file with the test case, but it doesn't actually run any of the tests. I followed the Rails plugin guide (http://guides.rubyonrails.org/plugins.html) where applicable, but it seems to be horribly outdated (it suggests things that Rails now do automatically, etc.) The only output I get is this: Kakadu:ingenious_record adam$ rake test (in /Users/adam/Sites/1_PRK/vendor/plugins/ingenious_record) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -Ilib:lib:test "/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rake-0.8.3/lib/rake/rake_test_loader.rb" "test/ingenious_record_test.rb" The simplest test case looks like this: require 'test_helper' require 'active_record' class IngeniousRecordTest < ActiveSupport::TestCase test "example" do assert false end end This should definitely produce at least some output, and the only test in that file should produce a failed assertion. Any ideas what I could do to get Rails to run my tests?

    Read the article

  • Rails 2.3.5 and oauth-plugin

    - by pgb
    I started a rails application from scratch, using Rails 2.3.5, and installed oauth-plugin. The installation was done by running script/plugin install git://github.com/pelle/oauth-plugin.git. Now, when I try to start the server, I get the following errors: => Rails 2.3.5 application starting on http://0.0.0.0:3000 /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:440:in `load_missing_constant': uninitialized constant Rails::Railtie (NameError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:80:in `const_missing' from /Users/Pablo/Projects/test.oauth/vendor/plugins/oauth-plugin/lib/oauth-plugin.rb:16 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' from /Users/Pablo/Projects/test.oauth/vendor/plugins/oauth-plugin/rails/init.rb:1:in `evaluate_init_rb' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:158:in `evaluate_init_rb' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:154:in `evaluate_init_rb' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin.rb:48:in `load' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:38:in `load_plugins' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `each' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/plugin/loader.rb:37:in `load_plugins' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:369:in `load_plugins' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:165:in `process' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `send' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/initializer.rb:113:in `run' from /Users/Pablo/Projects/test.oauth/config/environment.rb:9 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:521:in `new_constants_in' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:156:in `require' from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/commands/server.rb:84 from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `gem_original_require' from /Library/Ruby/Site/1.8/rubygems/custom_require.rb:31:in `require' from script/server:3 I can't figure out why this is failing. Am I missing a dependency? What other information I can provide to others help me figure this out?

    Read the article

  • Error while starting Rails server

    - by Girish Anand
    Hello i am new to ruby and rails ... but when i am starting the rail server i am getting this error This is the error i am getting D:\mynewapp>ruby script/server = Booting WEBrick = Rails 2.3.5 application starting on http://0.0.0.0:3000 D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require': n such file to load -- rush (MissingSourceFile) from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/vendor/gems/delayed_job-1.7.0/lib/delayed/worker.r 1:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/vendor/gems/delayed_job-1.7.0/lib/delayed_job.rb:6 n <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/mynewapp/config/environment.rb:39:in block in <top (requir )>' from D:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/initializer.rb:1 :inrun' from D:/mynewapp/config/environment.rb:9:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inblock in require' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:521:in new_constants_in' from D:/ruby/lib/ruby/gems/1.9.1/gems/activesupport-2.3.5/lib/active_s port/dependencies.rb:156:inrequire' from D:/ruby/lib/ruby/gems/1.9.1/gems/rails-2.3.5/lib/commands/server. :84:in <top (required)>' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from D:/ruby/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in require' from script/server:3:in' Any help will be appreciated Thanks in Advance

    Read the article

  • Is it possible to use best_in_place with typeahead from twitter bootstrap?

    - by Dave H
    Basically, I am using best_in_place in my rails webapp to let users edit their profile info in place. The thing is, I would like users to be presented with a typeahead form for certain entries.. Here's what I'm working with: <p>College/University: <input type="text" class="span3" style="margin: 0 auto;" data-provide="typeahead" data-items="8" data-source='["University of Pennsylvania","Harvard","Yale","Princeton","Cornell","Brown","Columbia","Dartmouth"]'></p> This gives me a working form box with typeahead. However, I want to be able to wrap this in best_in_place with something like <%= best_in_place @student, :education %> so that users only see the typeahead form when they click on the text, and upon clicking away from the box or hitting enter the selection is stored in the database. Is there a reasonably easy way to do this?

    Read the article

  • How to become a more organized programmer?

    - by Ted Wong
    I am a programmer that can code. But I find that I can get thing done, but not get thing do well or like most of the open source communities do. Well, I use some of the library from git hub. I find most of the programme is well structure. Also, a read me. My question are: Is that any common file structure or naming convention in the community or this is just a matter of personal taste? How to become a more organized programmer, instead of writing code just work. But more organized that let other easy to get in your project?

    Read the article

  • Cerification for Rails?

    - by Salil
    I have passed SCJP 1.5 for JAVA 3 years back it hepls me to clear BASICS of the JAVA and OOPS. I would like to know if there is any certification exam conducted for the Ruby or Ruby on Rails.providing url details will be more helpful.

    Read the article

  • Rails 3.0.0.beta Install problem: can't find executable rails

    - by JZ
    I'm trying to install the rails 3.0.0.beta and I'm running into this issue: justins-mac-: justinz$ ruby -v ruby 1.8.7 (2008-08-11 patchlevel 72) [universal-darwin10.0] justins-mac-justinz$ rails -help /Library/Ruby/Site/1.8/rubygems.rb:384:in `bin_path': can't find executable rails for rails-3.0.0.beta (Gem::Exception) from /usr/bin/rails:19 justins-mac-justinz$ rails -v /Library/Ruby/Site/1.8/rubygems.rb:384:in `bin_path': can't find executable rails for rails-3.0.0.beta (Gem::Exception) from /usr/bin/rails:19 justins-mac-justinz$ Any clues as to what is going on here?

    Read the article

  • Find which alias method is called in rails model

    - by Kashif Umair Liaqat
    I am new to rails development. I have created some aliases to a method and I want to know that which alias is called. I have this code. alias_method :net_stock_quantity_equals :net_stock_quantity alias_method :net_stock_quantity_gte :net_stock_quantity alias_method :net_stock_quantity_lte :net_stock_quantity alias_method :net_stock_quantity_gt :net_stock_quantity alias_method :net_stock_quantity_lt :net_stock_quantity def net_stock_quantity #some code here end I want to know that user has called which alias. Like if user calls net_stock_quantity_equals then I should know that the user has called net_stock_quantity_equals not net_stock_quantity. Any help would be appreciated.

    Read the article

  • Rails - how to use a plugin from github (how to install, utilize, etc)

    - by jyoseph
    I'm trying to install a couple of different plugins for my rails 3 app. I cd to '/vendor/plugins/', then type git clone the_git_src_url. I see the files in the /vendor/plugins/ directory. However when I try to use any of the tags provided by the plugin I get uninitialized constant ContentsController::HTMLToTextileParser PriceTag and html2textile are the two plugins I'm trying to use. This is what triggers the error above: <%= PriceTag.html_to_textile(@content.desc) %> I'm working in development, I've tried to restart the server. Is there something I'm missing?

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >