w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
ModelState.isValid = false on production machine, true on development machine
As I mentioned in the edit, I found the cause of and solution to my problem. It was caused by an error being thrown by the automatic binding of parameters, and the reason it was having issues with dates on my production machine was due to the locale settings (dd/mm/yy vs mm/dd/yy) on that machine. To fix, I set the computers region settings (in the control panel), and also added a line into my Web.config.

Categories : Jquery

Production and Development in WAMP
There are two php.ini files packaged with WAMP: php.ini-development and php.ini-production. They are preconfigured with common settings for either development or production. Whichever one you rename to php.ini is the one that will be used. If all you want to do is turn on error reporting, you can just edit whichever php.ini file you are currently using by clicking on the WAMP icon in your system tray and choosing PHP > php.ini. This will open the file in a text editor where you can change whatever config you want including: error_reporting = E_ALL & ~E_NOTICE There is lots of documentation online and in the file for possible values for this.

Categories : HTML

Why am I seeing iAd's advertisements, like I did in development, in my production app?
There is a possibility that you've got a development version on the phone and that wasn't overwritten by your app downloaded from app store. So, just try deleting the app from your phone and computer, and then try to re-sync.

Categories : Iphone

search working in development but not in production
As declan said, this is caused by the fact that postgres is case sensitive when using LIKE. The problem with using ILIKE is that it won't work in sqlite anymore. A kind of hack which works is to change the search condition to: find(:all, :conditions => ['UPPER(name) LIKE ?', "%#{search.upcase}%"])

Categories : Ruby On Rails

Default scope for production but not in development
You can try this: if Rails.env.production? # define your scope end or, if you want to define different scopes on different environments, you can do something like this: default_scope do case Rails.env when 'production' # define production default scope when 'development' # define development default scope end end

Categories : Ruby On Rails

Development to production updates using NoSQL
I had a similar problem/experience while managing a few production Mongo machines for about a year. Two quick pieces of advice: WiredPrairie is right. Version your documents and that will allow you to migrate in a casual/relaxed manner. I wish we had done that up front. One of my biggest regrets. We used Groovy to connect and do our schema/data changes and I loved it. The language is easy to learn and it works great with JSON. My practice was to back up the collections I'd be operating on, write the scripts in dev, run them and if I messed up, restore the backed up collections. Iterate until I got the scripts perfect and then repeat in production.

Categories : Mongodb

How to clone production db on Heroku to development db
you can do that with the taps gem heroku db:pull there are some posts about this topic at heroku as well: https://blog.heroku.com/archives/2009/3/18/push_and_pull_databases_to_and_from_heroku https://devcenter.heroku.com/articles/heroku-postgres-import-export

Categories : Ruby On Rails

Sqlite3 on development and mysql2 on production
You'll want your production database to look something like this: production: adapter: mysql2 encoding: utf8 database: name-of-your-mysql2-database-here pool: 5 username: root password: your_password

Categories : Mysql

Tracking changes between development, testing and production
I don't know about 'automatically track changes' but from visual studio there is the menu 'Compare Databases' : http://msdn.microsoft.com/en-us/library/aa833435(v=vs.100).aspx Maybe it could help.

Categories : Visual Studio

rack-pjax working in development but not production
Before you call pjax, try adding this to your JavaScript: $(document).on('pjax:timeout', function() { return false; }); This will disable the timeout. I had this exact same problem and the issue was that my app was too slow, and was taking too long to load, and pjax would cancel the request and send the browser on. You can of course increase the timeout but I thought this was nicer.

Categories : Ruby On Rails

How to Work on new development without affecting same production code
I believe that I am in a similar situation. What we've done is simply create two almost identical databases; production and development. The production database feeds our reporting software while the development database is where we are free to test out changes before copying the changes into production. All data loaded into the production database is loaded into the development database through a series of jobs and stored procedures that execute daily. This method, however, does involve extensive duplication of tables, stored procedures, etc., but it is the simplest way we know how to get the functionality we need.

Categories : Sql Server

A blank in the URI works in production but fails in development
Spaces are usually replaced with %20 for urls. Most web browsers will automatically replace this for you, so this explains why the browser can go to the site. Just use %20 in place of your spaces and you should be all set.

Categories : Ruby

Dealing with Paths/Links on Production and Development in JS
You could declare a function that returns the folder path depending on the location of the calling page something like function sitePath(){ if(this.result!=undefined){ // we have already tested so return the stored value return this.result } var folders=window.location.pathname.split('/'); if(folders.length && folders[0].indexOf('demo')==0){ // we are inside a demo folder so return and store the demo folder name return this.result='/' + folders[0]; }else{ // we are in the production environment so store an empty string return this.result = ''; } } Then in your code you would use: url: sitePath()+'/some-action.php'

Categories : Javascript

MongoDB synchronize Development and Production databases
You can use the mongoexport tool to export the single collection from your development database. Use it in conjunction with a --query option where you can express a predicate. For example something such as ${ts : {$gt : previous clone time}}. Then, use mongoimport to import your delta file into production database. Use --upsert and --upsertFields if you have two different logical documents with different _id values, but express the same document

Categories : Mongodb

Static files are served up in development but not in production
Couple things. 1st. Static assets don't have anything to do with the assets directory. Static assets are those stored in the public directory in your app. There's where the asset pipeline compiles the assets. 2nd. Look in your app/assets/stylesheets/application.css and see if the epiceditor is required there, so it would be precompiled along with the other assets. use ither require epiceditor/epiceditor or require_tree epiceditor or require_tree .. The last one will compile all the assets in your folder, btw. 3rd. Are you using an http-server (Apache or Nginx) in production? If so, you should turn off the static_assets serving, 'cause it will be handled by the server, and look into your server configurations.

Categories : Ruby On Rails

DynamoDB Staging/Production/Development versions
Besides creating a new AWS account you can use prefixes for Dynamo tables. For example, production-users, test-users, etc. However, for development purposes I'd recommend to use DynamoDB Local with jcabi-dynamodb-maven-plugin. The plugin starts a local version of DynamoDB before your integration tests and shuts it down right after. Much more convenient and stable than relying on a "test" table in DynamoDB.

Categories : Amazon

migrating database from development to production - rails
If what you're saying is that you didn't use migrations to perform some changes and now rake db:migrate doesn't produce the database structure that you want (obviously, because it has no idea that you made those changes), you still can use the schema.rb. rake db:schema:dump Will read the db and generate a schema.rb for it. Then you can load this schema.rb on production with rake db:schema:load RAILS_ENV=production Also, you can delete everything and create the database from scratch using the schema.rb file with rake db:reset RAILS_ENV=production

Categories : Mysql

How to set up Node server for production on own machine?
Two options. Either disable any other service running on port 80 and run Node with sudo. Or setup something like nginx to forward traffic from port 80 to your Node instance. To do that you can open a socket file with node and configure nginx similar to https://github.com/trevnorris/norrd/blob/master/conf/nginx.conf Creating the socket is simple enough. It's as simple as net.createServer(function(){}).listen('/path/to/file.sock'); I usually opt to spawn child processes for easier monitoring from the parent process, but use nginx to connect to each socket. For two reasons, one is it's easy to set route static content around the node process, and also because I prefer not to setup my own access privileges from scratch.

Categories : Linux

Which InstanceType for rails elastic beanstalk development vs. production?
My 2 cents - lean on the side of CPU over memory. CPU always helps; at the very least your app will compile assets and load into memory faster on deploys. I suggest starting with 2x c1.medium in production (in 2 different AZs for basic redundancy) and 1x m1.small in development. Don't overthink the machine sizes, instead get the low hanging fruit right, namely: put your static assets on a CDN and implement fragment caching (stored in a dedicated redis or memcached node per environment). If you've never done this before, New Relic Pro will likely give you a big head start identifying bottlenecks in your app. Then get to load testing! Also, please don't share your RDS instance between production and development. Isolate the two environments by giving each their own database.

Categories : Ruby On Rails

asp.net code executes very fast on development while very slow on production
Create a list for yourself of the potential lines or code fragments which might cause this slowness. Measure all of them and take a look at the results of your measures. Hopefully you will find the exact place where the stalling is caused and you will be closer to the solution.

Categories : C#

Getting install.php when export site from development server to production
Try setting the drive to mysqli. Also, follow this steps: 1) Take a back up of your db and save it to a safe place 2) Remove all the tables from the db, and remove the setting.php or rename it 3) Do you clean install of Drupal using those files 4) Once finished, import the db back up This process always works on all platforms, in all the situation

Categories : Drupal

Alternate grunt.js tasks for development/production environments
You can also just register a task that calls an array of tasks grunt.registerTask('prod', ['tasks1','task2']); before your default task, that would be $ grunt prod

Categories : Javascript

Codeigniter CIBonfire how to change mode from development to production?
In your index.php file in your CI-Bonfire. you can find this spot here, just change the define('ENVIRONMENT', 'development') into define('ENVIRONMENT', 'production') * You can load different configurations depending on your * current environment. Setting the environment also influences * things like logging and error reporting. * * This can be set to anything, but default usage is: * * development * testing * production * * NOTE: If you change these, also change the error_reporting() code below * */ define('ENVIRONMENT', 'production');

Categories : PHP

Staging, production, development branch (what am I doin' wrong?)
Git is telling you that you have a conflict in the following file app/views/devise/registrations/new.html.erb that Git cannot resolve by itself. This happens when you performed a change on the same file from 2 different branches. If the changes are too close together or too similar, Git could have issues merging them. Simply edit the file app/views/devise/registrations/new.html.erb to remove the conflict and help git merging the file.

Categories : GIT

installing ruby on rails from development onto production server
Checkout http://railscasts.com/episodes/335-deploying-to-a-vps and search for "capistrano" to deploy. It's an art. "It isn't connected to the internet so pretty much every tutorial I found hasn't worked" You are way off the beaten path here. but if you can get your git repo to a machine that is connected to the internet, you can deploy to Heroku easy, and/or run capistrano from there.

Categories : Ruby On Rails

C# smtpclient.send is very slow on development but fast on production
Do you have Symantec (or other Antivirus / Email protection) software installed on your dev machine? We had similar issues with out going SMTP traffic being stalled or killed when sending email. The production servers usually have exceptions built in for this traffic already thus no delay.

Categories : C#

twitter-bootstrap-rails - differences between development and production
I think you are using other style on your application, something like a scaffold for generator, scaffold will generate scaffold css. I'm use scaffold and i'm having scaffold.css.scss on my apps, Here's style of link on scaffold.css.scss a { color: #000; &:visited { color: #666; } &:hover { color: #fff; background-color: #000; } } You should remove style of link or you can remove scaffold style on your apps if you won't it. Twitter bootstrap do not have style link with a black background, by default. If you don't have other style on your app and only use twitter bootstrap you should find style of link that bring about an issue

Categories : Ruby On Rails

Development, Staging and Production Enviromnemts on the Azure Cloud
I would suggest either three separate Cloud Services, or even 3 subscriptions. The benefit with the different subscriptions is (a) you can control/restrict access to only those that should have access, and (b) provides an easy way to view costs for each environment (since billing is done at the subscription level).

Categories : Azure

Using php connect to production server in local machine
You will need to grant access to the production machine from your local machine. You can do so by granting all privileges on your IP address. For example, if your username was remote and your public IP address was 10.1.0.8, you would use this: GRANT ALL PRIVILEGES ON *.* TO remote@'10.1.0.8'; FLUSH PRIVILEGES; Remember to flush your updated privileges! You can now connect to the production machine using PHP. For example, if your production machine was at production.example.com, you would use this: mysql_connect("production.example.com", "remote", "My-p@ssw0rd"); mysql_select_db("example_db"); If you don't have root access to the production machine or can't grant privileges for some reason, you can also try to set up an SSH tunnel, if you have access to SSH. Instructions on how to s

Categories : PHP

Nested models work fine in development but are not being saved in production
So I'm not 100% sure what the problem was but I've fixed it. I ended up removing anything that had to do with skus then slowly adding it back in bit by bit. What I think most likely caused the issue was that I had a version of a the Product class that I renamed because I wasn't using it and didn't want to lose track of the work that I had done (I know, not necessary as I'm using git. I guess old habits die hard) Anyway, I had changed the file name, however I neglected to rename the class definition in the file. The name was such that it came after the real Product class that I was using. I'm thinking that this caused a conflict on heroku. The thing I don't understand is why it didn't cause any problems in my local dev environment.

Categories : Ruby On Rails

Downloading Rails Assets - File-paths In Development vs Production
In short: Yes. In long: in /config/initializers create a file called config.yml* Set it up like so: config.yml: --- ## NOT a tab character. 3 spaces. (In case that affects you) development: path_to_uploads: /path/to/downloads/for/development production: path_to_uploads: /path/to/downloads/for/production test: path_to_uploads: /path/to/downloads/for/test Then create a file in the same directory (/config/initializers/) called config.rb config.rb: APP_CONFIG = YAML.load_file("#{Rails.root}/config/initializers/config.yml") Hop over to your controller: foo_controller.rb: class FooController < ApplicationController def download

Categories : Ruby On Rails

Migrate Data and schema from development to production rails heroku
It is not a good idea to fill the production database with the data that you have now in the developement database. Because, if you have problems with your production database in the future, and you need to refill it again, your development db may changed (e.g dropped), and you are not going to be able to do it again. For this need, Rails provides seeds in db/seeds.rb file. You should create all the neccessary objects there. Then when you push your code to Heroku, Heroku is going to prepare the database, create the schema, and seed it. If you need to seed the db manually, you can run bundle exec rake db:seed, if you want to run it in Heroku: heroku run bundle exec rake db:migrate

Categories : Ruby On Rails

How do I statically configure Celery application differently in production and development?
The way that I do it is using an environment variable. As a simple example... # By convention, my configuration files are in a "configs/XXX.ini" file, with # XXX being the configuration name (e.g., "staging.ini") config_filename = os.path.join('configs', os.environ['CELERY_CONFIG'] + '.ini') configuration = read_config_file(config_filename) # Now you can create the Celery object using your configuration... celery = Celery('mymodule', broker=configuration['CELERY_BROKER_URL']) @celery.task def add_stuff(x, y): .... You end up running from the command line like so... export CELERY_CONFIG=staging celery -A mymodule worker This question has an example of doing something like this, but they say "how can I do this in a way that is not so ugly?" As far as I'm concerned, this is quite

Categories : Python

How do I copy data from production to the development server in Google App Engine?
Have you read the docs that specifically talk about downloading/uploading all your data ? https://developers.google.com/appengine/docs/python/tools/uploadingdata#Python_Downloading_and_uploading_all_data Note it says the --kind option is that an option. You can get all of the data by omitting that option.

Categories : Google App Engine

Remote debugging production IIS on Azure virtual machine
According to this MSDN article, Debugging over the internet is not supported. Instead you are advised to use IntelliTrace to run your app and then follow execution from the IntelliTrace log. Note that this requires Visual Studio Ultimate. The other alternative that I am aware of is to set up a VPN to allow you to attach the debugger in the normal fashion.

Categories : Asp Net Mvc

DateTime problems when moving to production environment
You can use the overload of Convert.ToDateTime which allows you to specify a culture. This will allow you to force it to always use UK culture if that is your requirements.

Categories : C#

Git, and moving between development machines
"I am happy to overwrite these changes, but I'm not sure how to do it." git reset --hard git pull origin master You can use git in your new computer exactly the same way as you do in your old computer. "Ideally I'd like to be able to exclude some files from being tracked..." Create .gitignore in the same directory and put the names of the files to exclude in it. If you're using windows, How to create .gitignore file

Categories : GIT

mtlanius theme issue - Site move from development to production server
But you did copy the entire database to a new server? Because if in core_resource table there would be entry for mtslideshow extension with the same version that it had on the last server, then sql shouldn't be run again.

Categories : Magento

Rails app works completely fine in production but not in development mode on localhost
use rails s webrick to force rails to use webrick. (A lot of the command options work like this as well for instance to start with mongrel (assuming you've got the gem) it's rails s mongrel)

Categories : Ruby On Rails

What's an easy way to manage local/development/production configuration files in PHP projects?
Try this: <?php // rename this file to whatever your configuration file is supposed to be called (wp-config.php, etc.). switch ($_SERVER['SERVER_NAME']): // assuming your local server name is 'localhost,' leave this section alone case 'localhost': require_once('local.config.php'); break; // replace production-url with the server name for your production site case 'production-url': require_once('production.config.php'); break; // replace development-url with the server name for your development site case 'development-url': require_once('development.config.php'); break; default: // something went wrong; endswitch; // There is no php closing tag in this file, // it is intentional because it prevents trailing whit

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.