Search Results

Search found 9437 results on 378 pages for 'rails newbie'.

Page 138/378 | < Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >

  • Where is the best place to store globals in Rails app?

    - by Nick Gorbikoff
    Hello. I was wondering if there is the best practice on where to store global settings in a rails app. What I mean by that is i.e: I have a few globals defined that may change, but not likely and it seems inappropriate to store them in DB since they are used so much. For instance I have SYSTEM_EMAIL & SYSTEM_EMAIL_SIGNATURE & SYSTEM_STORAGE_ROOT. Right now I keep them in environment.rb, but I'm not sure if this is the right palce to store them. Thank you

    Read the article

  • How to compare Rails ''executables" before and after refactor?

    - by Kyle Heironimus
    In C, I could generate an executable, do an extensive rename only refactor, then compare executables again to confirm that the executable did not change. This was very handy to ensure that the refactor did not break anything. Has anyone done anything similar with Ruby, particularly a Rails app? Strategies and methods would be appreciated. Ideally, I could run a script that output a single file of some sort that was purely bytecode and was not changed by naming changes. I'm guessing JRuby or Rubinus would be helpful here.

    Read the article

  • tab complete not working for vim in particular directory - ubuntu 12.04

    - by user1160958
    I am working on a ruby on rails app. All of the sudden the command line tab complete stopped working for vim, only for files though, and only for the vim command (i.e. works for other commands, ls, rm etc.) After further investigation - this only occurs in a specific directory, the home directory of my rails app. If I go into a sub directory in my rails app, or any other directory on my machine, the tab complete works again. If I go into the root directory of any other rails app, it works. I also tried renaming the diretory, and copying the contents of the directory to another directory, and that did not work either. It only does not work for files, and works for any other command - ls, rm etc. But when I do vim /path/to/file/, then tab to see a list of files in that directory, only other directories show, not files. I am using ubuntu 12.04. Also, I tried re-installing vim, re-booting, removing ~/.viminfo (there was no vimrc file) that didn't work. Any help would be appreciated!

    Read the article

  • Has test driven development (TDD) actually benefited a real world project?

    - by James
    I am not new to coding. I have been coding (seriously) for over 15 years now. I have always had some testing for my code. However, over the last few months I have been learning test driven design/development (TDD) using Ruby on Rails. So far, I'm not seeing the benefit. I see some benefit to writing tests for some things, but very few. And while I like the idea of writing the test first, I find I spend substantially more time trying to debug my tests to get them to say what I really mean than I do debugging actual code. This is probably because the test code is often substantially more complicated than the code it tests. I hope this is just inexperience with the available tools (RSpec in this case). I must say though, at this point, the level of frustration mixed with the disappointing lack of performance is beyond unacceptable. So far, the only value I'm seeing from TDD is a growing library of RSpec files that serve as templates for other projects/files. Which is not much more useful, maybe less useful, than the actual project code files. In reading the available literature, I notice that TDD seems to be a massive time sink up front, but pays off in the end. I'm just wondering, are there any real world examples? Does this massive frustration ever pay off in the real world? I really hope I did not miss this question somewhere else on here. I searched, but all the questions/answers are several years old at this point. It was a rare occasion when I found a developer who would say anything bad about TDD, which is why I have spent as much time on this as I have. However, I noticed that nobody seems to point to specific real-world examples. I did read one answer that said the guy debugging the code in 2011 would thank you for have a complete unit testing suite (I think that comment was made in 2008). So, I'm just wondering, after all these years, do we finally have any examples showing the payoff is real? Has anybody actually inherited or gone back to code that was designed/developed with TDD and has a complete set of unit tests and actually felt a payoff? Or did you find that you were spending so much time trying to figure out what the test was testing (and why it was important) that you just tossed out the whole mess and dug into the code?

    Read the article

  • Need help connecting to NAS externally-port forwarding and DDNS newbie

    - by Joel
    Hi folks, I just picked up a synology NAS, and I'm loving it for internal use, but I want to be able to access the NAS externally-both from my iPhone (3G) and from the net. I have a Linksys WRT54G-TM router. My first question is whether I have set up the dyndns correctly. On my computer that is on my network, if I put in mydomain.dyndns.org, I am taken to a password popup and when I enter my router login and password, my router admin page opens up. On the same computer, I get the same results if I use my external IP address, and if I use my internal IP 192.168.0.1 So that is all as expected. However, when I go to my iphone and turn off wifi, and try to connect with 3g to the external IP or the dnydns domain, I just get an error "Safari could not open the page because the server stopped responding". What's up?

    Read the article

  • Ubuntu Newbie Needs Assistance!!

    - by Steve Greene
    New Ubuntu User Needs Help!- version 9.10 does not communicate with laptop Hello folks, Several days ago, I installed Ubuntu 9.10 onto my Acer Aspire 3100 laptop, running it alongside Widows Vista as a dual-bootable system. Creation of the Ubuntu boot CD went fine, and the installation onto my hard drive was flawless. Ubuntu opens and behaves as I would expect, except for one little problem. For reasons unknown to me, Ubuntu is not communicating with my laptop's networking hardware, and I have no internet connectivity, even when sitting directly under the wireless router at the local library (literally), which puts out a wickedly-fast signal that my Windows Vista OS auto-detects and immediately connects to. Up in the right side of the Ubuntu desktop, I click on the network icon and it does not show a wireless connection at all, even though I am only a few feet from the router. At home, where I use a dialup modem, I also see no means of getting online. My modem is an HDAUDIO Soft Data Fax Modem with Smart CP,manufactured by CXT (Conexant Systems Inc., file version 4.0.13.0, and the driver version is 7.58.0.0). I desparately wish to convert to Ubuntu. I used Mac for ten years, and then Windows for ten years. Now, after 20 years, I want to live out my days as an open-source Ubuntu fanatic. I am ready to give the old status quo the boot! I am an advanced computer user, but I am not a programmer. I seek a solution that is user-friendly for normal people, something equivalent to a driver that I can easily install or activate that will allow Ubuntu to see my hardware and get me connected. Can anyone help me over this hopefully-little glitch so that I can move on in total Ubuntu bliss? My processor is a Mobile AMD Sempron Processor 3500+ at 1.80 GHz, 1.50 GB RAM, and a 32-bit Operating System. I am running Windows Vista Home Basic, Service Pack 2. My current email is [email protected] if you have a workable solution that does not require programmer status to implement. Surely this must be a simple fix that I simply am overlooking, but being the new guy on the block, I have yet to be enlightened. Thanks for your help in coming up to speed!! Steve Wanna' be Ubuntu Fanatic "If you're not living on the edge, you're taking up too much space."

    Read the article

  • Linux Newbie: SSH or VNC for linux admin tasks

    - by Dirk
    Longtime Windows user, looking to get my feet wet with Linux. Since Windows makes comparatively little use of the command line, I'm naturally more comfortable with GUI tools for remote server administration tasks. However, before i rush out and install a VNC server on my Linux box, I want to get a sense of how many of Linux's various packages actually offer GUI front end. If not many, then it's probably not worth the effort.

    Read the article

  • VMWare Newbie - looking for hardware recommendations and help :) [closed]

    - by Dan
    I am looking for some hardware recommendations on an upcoming virtualization project. We are a small company (80 users - 25 in site 1, 55 in site 2) currently using Windows Server 2003 - no VM servers yet. Our AD is setup where site 1 is the root domain and site 2 is a subdomain/subnet - connected by T1 and VPN for failover. The current DC's also server as file servers, print servers, AntiVirus servers. Email is in the cloud. Additionally then in site 1 we have 3 additional member servers - one running IBM Websphere for a customer specific app, one running Infor PowerLink (no real heavy load) and another that we use for Virtual Studio apps and also runs DirSync for Exchange Online. No heavy workloads on any of these machines really. We also have an AS400 box that we run ERP/CRM software on that site 2 connects to over the WAN link. In site 2 we also have a SQL machine that runs on Win2K server. Database files are not large less than 5 GB. Light to Medium workload on this machine. File servers in each site store less than 500 GB data and probably won't grow to more than 1TB in the next 5 years. I am looking to go to VMWare in both sites and virtualize all servers. What recommendations do you have for server, storage hardware? Is it safe to virtualize all of your DC's? Any help or advice would be greatly appreciated. Thanks.

    Read the article

  • Newbie one: Virtual Networks - Hyper-V - Remote Destktop - Only one phisical NIC

    - by josecortesp
    Hello everyone, I'll try to explain my situation and I'll apreciate any help: I have a phisical server (quad core, 4Gb ram, 1TB raid 10, etc) with Win Server 2008 R2 enterprise, running IIS, Printing, etc... Also, I want to set up 2 virtual Servers with 2008 R2 standart one with SQL Server and the other with Team Foundation. What i need is: Being able to access from inside the private phisical network, to Remote Desktops on each of the Virtual and the phisical Servers Had Access from the outside, using a router and port Forwarding, to the TFS server and the IIS server (one is virtualized, the other is phisical) This is it, but note that I only have one Phisical Nic. How do I configure this to work. When i set up the hyper-v role, on the wizard something like it showed up but I don't remmember what i choose, and right now, I cannot access none of the servers from remote desktop, not even from the phisical private network. Can anybody point me, what can i do? Thanks in advance (sorry 4 my english, i'm a spanish talker and my english isn't that good)

    Read the article

  • newbie hard drive upgrade question

    - by musoNic80
    I have an Acer Aspire 3500WLMi laptop. It currently has a 40gb hard drive which I would like to upgrade. Could someone talk me through the process? I've listed my concerns/queries... Can I buy and install any 2.5" SATA or IDE hard drive into this machine? Should I buy somesort of USB caddy and clone my existing drive onto the new one via USB then physically swap the drives over? My current disk is partitioned to include a small amount of space for a Ubuntu install. Will a clone keep the current partition sizes or is it best for me to repartition once I've cloned? Many thanks.

    Read the article

  • Please explain some of the features of URL Rewrite module for a newbie [closed]

    - by kunjaan
    I am learning to use the IIS Rewrite module and some of the "features" listed in the page is confusing me. It would be great if somebody could explain them to me and give a first hand account of when you would use the feature. Thanks a lot! Rewriting within the content of specific HTML tags Access to server variables and HTTP headers Rewriting of server variables and HTTP request headers What are the "server variables" and when would you redefine or define them? Rewriting of HTTP response headers HtmlEncode function Why would you use an HTMLEncode in the server? Reverse proxy rule template Support for IIS kernel-mode and user-mode output caching Failed Request Tracing support

    Read the article

  • Newbie: VirtualBox "no bootable medium found"

    - by Newton Falls
    My first foray into VM land so please excuse the stupidity expressed below. Running VirtualBox on Kubuntu 9.10 and trying to set up a VM running Windows 7. Windows 7 came installed and is functional as a dual-boot but I want to stay in kubuntu hence the VM. Received "Fatal: no bootable medium found" when trying to start a VM. Not surprising since VBox never gave me an option (that I recognized anyway) to tell it to look on the hard drive. I did not receive a CD of Windows 7 with the machine. How can I tell VirtualBox to grab what it needs from the hard drive? Or am I out of luck because I don't have a CD? Update: This might not be possible. The installed Windows 7 is useful only to pull the installation key. It is easier to just to download or get an ISO from a friend and enter in your own key.

    Read the article

  • 'IPv6' Newbie with IPv6 address assigment

    - by Cute Puppy
    I am new to IP v6 and I am looking to translate some existing private IPv4 addresses into v6 address assignment. Can someone please help me to answer/explain the questions below? If I have an v4 address of: 10.10.0.0/22 10.10.1.0/22 10.10.2.0/22 10.10.3.0/22 10.10.8.0/20 10.20.1.0/24 What will the new v6 address to be? I have been looking online @ http://www.subnetonline.com/pages/subnet-calculators/ipv4-to-ipv6-converter.php or other sites, Seems like they translated it directly to be: fe80::a0a:0 /118 fe80::a0a:100 /118 fe80::a0a:200 /118 fe80::a0a:300 /118 fe80::a0a:800 /118 fe80::a14:100 /120 Can someone please explain to me how we get to /118 from either "/22 or /24" (1. and 5) In addition, I would like to create the new private address based on the Unique local address "fc00::/16" How do I expand from there? Any help is greatly appreciated it!! Thanks,

    Read the article

  • Exchange 2007 Backup - For a newbie

    - by mew3900
    I am trying to setup an exchange 2007 backup solution. After doing a lot of reading, Microsoft have decided in server 2008 unless you are willing to spend a great deal on a 3rd party solution you are pretty stuck! Essentially what I have been asked to do is perform an off-line file backup of our current exchange server and replicate this onto a new 2nd server. The reasoning behind this is that we need to upgrade our current installation of exchange 2007 to SP2 so that the exchange plug-in for windows server backup will be available to us. From this I can then actually take an exchange aware backup weekly and take it off site. Ideally then also we can migrate to this new server and keep the old one as a fail over. Is there a way I can copy across the files required onto a second server, although I doubt very much it is that simple. I may be barking up completely the wrong tree, however I have very limited knowledge with Exchange and any help and advice on how I would resolve this would be much appreciated. Thanks in advance

    Read the article

  • Live examples of the Windows Azure Platform running Java and Ruby on Rails

    - by Eric Nelson
    At QCon in March we had a booth focused on interoperability out of which came the idea to create an application implemented in both Java and Ruby on Rails, running on top of the Windows Azure Platform. Nothing fancy, just an application to capture attendees view on Microsoft and Interoperability. It was implemented by Active Web Solutions, long time fans of Azure. Wroth a quick squint :-) Check out the related links below for info to get you up and running. Check out The Java version http://ukinterop.cloudapp.net/  The Ruby on Rails version http://rubyukinterop.cloudapp.net/ (run out of time to finish this one) Related Links: Tomcat Solution Accelerator http://code.msdn.microsoft.com/winazuretomcat AzureRunMe http://azurerunme.codeplex.com/ UK Azure Online Community – join today. UK Windows Azure Site Start working with Windows Azure

    Read the article

  • Ruby on Rails 3 bientôt terminé, une RC attendue pour début juin

    Mise à jour du 27/05/10 Ruby on Rails 3 bientôt terminé Une RC attendue pour début juin La version 3 du framework pour le développement web ne devrait plus tarder à débarquer. Une Release Candidate est en effet attendue dans un peu moins de deux semaines. Quant à la version finalisée devrait logiquement suivre assez rapidement. Le créateur du framework, David Heinemeier Hansson, a laissé entendre qu'il espérait pourvoir dévoiler une RC lors du RailsConf qui se tiendra à Baltimore le 7 juin prochain. Ruby on Rails 3 est actuellement disponible en beta. Pour mémoire, cette nouvelle version marque la fusion...

    Read the article

  • Rails3 server and bundler error: uninitialized constant Bundler (NameError)

    - by .yandex.rurap-kasta
    I just install rails 3 and all gems that it need, but when I try to start server, it says about problem in boot script. [rap-kasta@acerAspire testR3]$ script/rails server /home/rap-kasta/tmp/testR3/config/boot.rb:7:in `rescue in <top (required)>': uninitialized constant Bundler (NameError) from /home/rap-kasta/tmp/testR3/config/boot.rb:2:in `<top (required)>' from script/rails:9:in `require' from script/rails:9:in `<main> So, I tried to reinstall Bundler, install "pre"-version (but really it has version number lower then i install by gem install bundler Now there are next gems in system: abstract (1.0.0) actionmailer (3.0.0.beta, 2.3.5, 2.3.4) actionpack (3.0.0.beta, 2.3.5, 2.3.4) activemodel (3.0.0.beta) activerecord (3.0.0.beta, 2.3.5, 2.3.4) activeresource (3.0.0.beta, 2.3.5, 2.3.4) activesupport (3.0.0.beta, 2.3.5, 2.3.4) arel (0.2.1, 0.2.pre) builder (2.1.2) bundler (0.9.5) erubis (2.6.5) fxri (0.3.7) fxruby (1.6.20) i18n (0.3.3) jemini (2010.1.24, 2010.1.5) mail (2.1.2) memcache-client (1.7.8) mime-types (1.16) mysql (2.8.1) nifty-generators (0.3.2, 0.3.0) rack (1.1.0, 1.0.1, 1.0.0) rack-mount (0.5.1, 0.4.0) rack-openid (0.2.3, 0.2.2) rack-test (0.5.3) rails (3.0.0.beta, 2.3.5, 2.3.4) railties (3.0.0.beta) rake (0.8.7) rawr (1.3.8) RedCloth (4.2.2) ruby-mysql (3.0.2) ruby-openid (2.1.7) rubygems-update (1.3.5) rubyzip (0.9.4, 0.9.1) rubyzip2 (2.0.1) sqlite3-ruby (1.2.5) text-format (1.0.0) text-hyphen (1.0.0) thor (0.13.2, 0.13.1) tzinfo (0.3.16) Also, there is same error with rails console and similar with bundle check: [rap-kasta@acerAspire testR3]$ bundle check /usr/lib/ruby/gems/1.9.1/gems/bundler-0.9.5/bin/bundle:12:in `rescue in <top (required)>': uninitialized constant Bundler::BundlerError (NameError) from /usr/lib/ruby/gems/1.9.1/gems/bundler-0.9.5/bin/bundle:10:in `<top (required)>' from /usr/bin/bundle:19:in `load' from /usr/bin/bundle:19:in `<main>'

    Read the article

  • Problem with cucumber

    - by sev
    I want to make rails app which will require minimum gems. I freeze gems into app and try to run cucumber's test and I've got the an error. Below is sequence of my actions. What I do wrong? rails cucumber && cd cucumber rake rails:freeze:gems add at the end of config/environments/test.rb: config.gem 'gherkin' config.gem 'cucumber-rails' config.gem 'database_cleaner' config.gem 'webrat' rake gems:unpack:dependencies RAILS_ENV=test rake gems:build RAILS_ENV=test rake gems RAILS_ENV=test [F] gherkin [F] trollop = 1.16.2 [F] cucumber-rails [F] cucumber = 0.8.0 [F] gherkin = 1.0.30 [F] trollop = 1.16.2 [F] term-ansicolor = 1.0.4 [F] builder = 2.1.2 [F] diff-lcs = 1.1.2 [F] json_pure = 1.4.3 [F] database_cleaner [F] webrat [F] nokogiri = 1.2.0 [F] rack = 1.0 [F] rack-test = 0.5.3 [F] rack = 1.0 script/generate cucumber rake db:migrate gem uninstall builder cucumber cucumber-rails diff-lcs gherkin json_pure nokogiri rack-test term-ansicolor trollop webrat rake cucumber /usr/bin/ruby1.8 -I "cucumber/vendor/gems/cucumber-0.8.0/lib:lib" "cucumber/vendor/gems/cucumber-0.8.0/bin/cucumber" --profile default /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- gherkin (LoadError) from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in require' from cucumber/vendor/gems/cucumber-0.8.0/bin/../lib/cucumber/cli/main.rb:5 from cucumber/vendor/gems/cucumber-0.8.0/bin/cucumber:5:inrequire' from cucumber/vendor/gems/cucumber-0.8.0/bin/cucumber:5 rake aborted! Command failed with status (1): [/usr/bin/ruby1.8 -I "cucumbe...] (See full trace by running task with --trace)

    Read the article

  • CakePHP, CodeIgniter or Rails for multi-user Tumblr clone?

    - by Jordan
    I'm about to start building a tumblr clone that handles multiple users (so premade clones like Gelato won't cut it) and I'm not sure which framework I'd like to build this is. Right now, I'm only intending to build a prototype. Something I can get a dozen friends on to test the concept and grow to maybe a couple hundred users to prove the market, so I'm not worried about long term scale. My biggest concern right now is quick deployment. I'd like to get from zero to signups in as short a time as possible, with as little customization to the framework of choice as possible. I have experience with PHP, but not Ruby. However, I don't think the learning curve would be too steep so I'm not ruling out rails. I just want the framework that is most appropriate for a system like a multi-user tumblr clone so that I can build it with as little hassle, and as quickly, as possible. If anyone has experience with a similar project, or with these frameworks and can offer an insightful perspective, I'd be very appreciative. Thanks for taking the time to read. Cheers, ~Jordan Feldstein

    Read the article

  • Weird response for controller.request.format.html? in Rails

    - by Tony
    In my main controller, I have this: class MainController < ApplicationController before_filter do |controller| logger.info "controller.request.format.html? = #{controller.request.format.html?}" logger.info "controller.request.format.fbml? = #{controller.request.format.fbml?}" controller.send :login_required if controller.request.format.html? controller.send :facebook_auth_required if controller.request.format.fbml? end As expected, I get "true" for the ...fbml? line if a request comes from Facebook (my facebooker gem automatically sets the format). However, I get "5" for the ...html? line if the request comes from Facebook. Why would a method with a ? ever return a "5"? Isn't that against Rails conventions? Also, I think "5" is considered true so this might mess up my filters. Still looking into that... Any ideas?

    Read the article

  • Altering URLs and mapping - path_prefix? - Ruby on Rails...

    - by bgadoci
    Ok, so I am working on a blog application of sorts. Thus far, it allows for a user to sign up for their own account, create posts, tags, comments, etc. I have just implemented the ability to use www.myapp.com/brandon to set @user to find by username and therefore correctly display the users information at each url. So when you go to www.myapp.com/brandon you see all Brandon's posts, tags, and comments associated with those posts, etc. Works great. I implementing this URL mapping through the routes.rb file by adding the following: map.username_link '/:username', :controller => 'posts', :action => 'index' And then just setting the @user variable in the PostController and corresponding views to find_by_username. Now the issue is this. Once at www.myapp.com/brandon when you click on a post title, it sends to myapp.com/posts/id without the username in the URL which blows up my view because nothing is being set for the @user variable. How do I tell Rails to create the link reading www.myapp.com/brandon/posts/id vs www.myapp.com/posts/id and then map that action? I am assuming this will involve some code in the view, and then adding another line in the routes.rb file, map.subdomain_link '/:username/posts/:id', :controller => 'posts', :action => 'show' and adding the @user variable to the PostController#show action, but not totally sure if this is even the right approach. UPDATE: I have been reading about :path_prefix and seems like it might be what I am looking for. I have tried to implement simply by adding map.resources :posts, :path_prefix => '/:user_username/:post_id' to the routes.rb file but not working (even after server restart). I am sure this is not correct but wanted to let you know what I have tried.

    Read the article

  • How to create a rails staging environment in engineyard?

    - by siulamvictor
    I have a production instance in engineyard up and running well. I would like to create a new staging instance for internal testing. I cloned the existing production instance, changed Framework Environment to staging. I can deploy all the code to staging instance from Github. Engineyard reported the server is fully configured and ready. I have subdomain-fu in my Rails app, as I have some subdomain handling in my app. I set the subdomain initializer like this.... SubdomainFu.tld_sizes = {:development => 1, :test => 0, :production => 1, :staging => 2} As the production instance is using the domain xxxxx.com, I would like my staging instance use the domain staging.xxxxx.com. But I got an error when open this domain. Seems the app use xxxxx.com as domain but not the staging.xxxxx.com. I checked the engineyard database.yml. It use xxxxx_production database, I supposed it should be xxxxx_staging. Seems the engineyard instance is not set to staging environment, but just clone all the setting from production server. Does anyone have experience with this and can show me the way on how to fix it? Thanks. :)

    Read the article

< Previous Page | 134 135 136 137 138 139 140 141 142 143 144 145  | Next Page >